mirror of
https://github.com/langgenius/dify.git
synced 2026-10-04 13:47:55 +08:00
WorkflowService.publish_workflow returns a single Workflow (-> Workflow), but dify_port.publish still unpacked it as (workflow, retirement_candidates) -- a stale signature. Every other caller was updated when the return type changed (via the main merge); only the Dify Builder port was missed, so every publish crashed with "TypeError: cannot unpack non-iterable Workflow object", surfaced to the user as a generic "step failed" SSE frame. Assign the single return value (retirement_candidates was unused anyway). The existing test_dify_port publish test mocked publish_workflow as a 2-tuple, which masked the bug -- corrected it to the real -> Workflow signature so it now guards the regression. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>