Skip to content

Conversation

@mattkrain
Copy link
Collaborator

update_block_workflow() currently does not check if the existing_workflow_id is the "FINAL" workflow.

Issue 1:
This causes the existing_workflow_id to become assigned to the "INITIAL" workflow, which can cause a patch error if the FINAL workflow does not equal the INITIAL workflow.

Issue 2:
This also prevents the blocks FINAL workflow from being patched back to the INITIAL workflow

# hardcoded default workflow
continue
existing_workflow_id = w.id
if w.category != "INITIAL":
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't this break if we'd only have INITIAL workflow since existing_workflow_id would never be defined?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

I created a new task to share this example:
Each block in task.blocks contains the workflow attribute (list) with categories: FINAL and INITIAL, even when the block's workflow hasn't been updated. We always have FINAL and INITIAL workflows present on new task/block creation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants