Trying to resolve an error with the task log.

This commit is contained in:
danfunk 2023-06-07 15:02:32 -04:00
parent 50de3536fc
commit 901042ae96
2 changed files with 7 additions and 2 deletions

View File

@ -47,6 +47,9 @@ class StudyView(AdminModelView):
can_create = True
can_edit = True
can_delete = True
column_exclude_list = ['primary_investigator_id', 'primary_investigator', 'sponsor', 'ind_number',
'investigator_id', 'investigator_uids', 'requirements', 'enrollment_date', 'short_name',
'proposal_name', 'progress']
class ApprovalView(AdminModelView):

View File

@ -54,13 +54,15 @@ class TaskLogModelSchema(ma.Schema):
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)
return category.display_name
if category:
return category.display_name
@staticmethod
def get_workflow(obj):
if hasattr(obj, 'workflow_spec_id') and obj.workflow_spec_id is not None:
workflow_spec = WorkflowSpecService().get_spec(obj.workflow_spec_id)
return workflow_spec.display_name
if workflow_spec:
return workflow_spec.display_name
class TaskLogQuery: