fix(update): correct image removal node data reference

- Reference $('Format Update Result') instead of $json for currentImageId
- The Telegram node doesn't pass through input data, it returns API response
- Also add no-op command fallback when currentImageId is missing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Lucas Berger
2026-02-02 20:56:00 -05:00
parent 4f85e00dc4
commit 88830a8b61
+1 -1
View File
@@ -1907,7 +1907,7 @@
},
{
"parameters": {
"jsCode": "// Build remove old image command (fire and forget)\nconst currentImageId = $json.currentImageId;\n\n// Skip if no image ID (error case)\nif (!currentImageId) {\n return { json: { skip: true } };\n}\n\n// Remove the old image - ignore errors (image might be used by another container)\nreturn {\n json: {\n cmd: `curl -s -o /dev/null -w \"%{http_code}\" --unix-socket /var/run/docker.sock -X DELETE 'http://localhost/v1.47/images/${currentImageId}?force=false'`,\n currentImageId\n }\n};"
"jsCode": "// Build remove old image command (fire and forget)\n// Reference Format Update Result since Telegram node doesn't pass through our data\nconst currentImageId = $('Format Update Result').item.json.currentImageId;\n\n// Skip if no image ID (error case) - use no-op command\nif (!currentImageId) {\n return { json: { cmd: 'true', skip: true } };\n}\n\n// Remove the old image - ignore errors (image might be used by another container)\nreturn {\n json: {\n cmd: `curl -s -o /dev/null -w \"%{http_code}\" --unix-socket /var/run/docker.sock -X DELETE 'http://localhost/v1.47/images/${currentImageId}?force=false'`,\n currentImageId\n }\n};"
},
"id": "code-build-remove-image",
"name": "Build Remove Image Command",