mirror of
https://github.com/sartography/cr-connect-workflow.git
synced 2025-02-22 12:48:25 +00:00
Adds workflow spec title to workflow api schema
This commit is contained in:
parent
f0bd8d4f9e
commit
cd16b984e0
@ -119,6 +119,8 @@ def __get_workflow_api_model(processor: WorkflowProcessor, next_task = None):
|
|||||||
|
|
||||||
navigation.append(NavigationItem(**nav_item))
|
navigation.append(NavigationItem(**nav_item))
|
||||||
NavigationItemSchema().dump(nav_item)
|
NavigationItemSchema().dump(nav_item)
|
||||||
|
|
||||||
|
spec = session.query(WorkflowSpecModel).filter_by(id=processor.workflow_spec_id).first()
|
||||||
workflow_api = WorkflowApi(
|
workflow_api = WorkflowApi(
|
||||||
id=processor.get_workflow_id(),
|
id=processor.get_workflow_id(),
|
||||||
status=processor.get_status(),
|
status=processor.get_status(),
|
||||||
@ -129,7 +131,8 @@ def __get_workflow_api_model(processor: WorkflowProcessor, next_task = None):
|
|||||||
is_latest_spec=processor.is_latest_spec,
|
is_latest_spec=processor.is_latest_spec,
|
||||||
total_tasks=processor.workflow_model.total_tasks,
|
total_tasks=processor.workflow_model.total_tasks,
|
||||||
completed_tasks=processor.workflow_model.completed_tasks,
|
completed_tasks=processor.workflow_model.completed_tasks,
|
||||||
last_updated=processor.workflow_model.last_updated
|
last_updated=processor.workflow_model.last_updated,
|
||||||
|
title=spec.display_name
|
||||||
)
|
)
|
||||||
if not next_task: # The Next Task can be requested to be a certain task, useful for parallel tasks.
|
if not next_task: # The Next Task can be requested to be a certain task, useful for parallel tasks.
|
||||||
# This may or may not work, sometimes there is no next task to complete.
|
# This may or may not work, sometimes there is no next task to complete.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user