Conversation
Backend Test FailuresFailures on
|
fd70cc7 to
178731a
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| if owner: | ||
| actor = parse_and_validate_actor(str(owner), project.organization_id) | ||
| if actor is not None: | ||
| workflow_payload["owner"] = actor.identifier |
There was a problem hiding this comment.
Owner clearing fails when explicitly set to None
Medium Severity
The if owner: check in format_request_data treats an explicitly-passed None value the same as a missing key. When a user sends "owner": null to clear an existing owner, data.get("owner") returns None, the falsy check skips the block, and workflow_payload never receives an owner key. The WorkflowValidator.update method then sees "owner" not in validated_data and preserves the old owner. The downstream update_owner function correctly handles None by clearing both owner_user_id and owner_team_id, but it's never reached. The existing test_no_owner test doesn't catch this because the workflow starts without an owner. A check like if "owner" in data with separate handling for None vs. truthy values is needed.


Follow up to #110785 and #110381 to write and update the owner on a workflow if that data is passed to the legacy endpoint and we have the feature flag flipped so that we single write.