make it so we can delete TaskInstructionsForEndUserModel on instance delete

This commit is contained in:
burnettk 2023-12-19 15:28:02 -05:00
parent 3fce735d4f
commit d688e2414d
No known key found for this signature in database
2 changed files with 4 additions and 0 deletions

View File

@ -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",

View File

@ -902,3 +902,6 @@ class TestProcessInstanceProcessor(BaseTest):
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()