Trying to resolve an error with the task log.

This commit is contained in:
danfunk 2023-06-07 15:29:41 -04:00
parent 901042ae96
commit 8755bc8b29
1 changed files with 4 additions and 3 deletions

View File

@ -53,9 +53,10 @@ class TaskLogModelSchema(ma.Schema):
def get_category(obj):
if hasattr(obj, 'workflow_spec_id') and obj.workflow_spec_id is not None:
workflow_spec = WorkflowSpecService().get_spec(obj.workflow_spec_id)
category = WorkflowSpecService().get_category(workflow_spec.category_id)
if category:
return category.display_name
if workflow_spec:
category = WorkflowSpecService().get_category(workflow_spec.category_id)
if category:
return category.display_name
@staticmethod
def get_workflow(obj):