Skip to content

Commit

Permalink
make it so we can delete TaskInstructionsForEndUserModel on instance …
Browse files Browse the repository at this point in the history
…delete
  • Loading branch information
burnettk committed Dec 19, 2023
1 parent 3fce735 commit d688e24
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ class ProcessInstanceModel(SpiffworkflowBaseDBModel):
overlaps="active_human_tasks",
) # type: ignore
message_instances = relationship("MessageInstanceModel", cascade="delete") # type: ignore
task_instructions_for_end_user = relationship("TaskInstructionsForEndUserModel", cascade="delete") # type: ignore
process_metadata = relationship(
"ProcessInstanceMetadataModel",
cascade="delete",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -902,3 +902,6 @@ def test_can_store_instructions_for_end_user(
assert len(remaining_entries) == 2
for entry in remaining_entries:
assert entry.has_been_retrieved is True

db.session.delete(process_instance)
db.session.commit()

0 comments on commit d688e24

Please sign in to comment.