From ae78a80221036dbb7ea66d614dbced30f0fd5552 Mon Sep 17 00:00:00 2001 From: vinicvaz Date: Fri, 21 Jun 2024 09:28:41 -0300 Subject: [PATCH] fix create workflow values for integer=0 --- .../src/features/workflowEditor/context/workflowsEditor.tsx | 2 +- rest/services/workflow_service.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/features/workflowEditor/context/workflowsEditor.tsx b/frontend/src/features/workflowEditor/context/workflowsEditor.tsx index 316bdcdb..77e87e3c 100644 --- a/frontend/src/features/workflowEditor/context/workflowsEditor.tsx +++ b/frontend/src/features/workflowEditor/context/workflowsEditor.tsx @@ -232,7 +232,7 @@ const WorkflowsEditorProvider: FC<{ children?: React.ReactNode }> = ({ return acc; } - if (!value.fromUpstream && !value.value) { + if (!value.fromUpstream && typeof value.value === 'string' && !value.value) { return acc; } if ( diff --git a/rest/services/workflow_service.py b/rest/services/workflow_service.py index 7a32010d..99fafbf6 100644 --- a/rest/services/workflow_service.py +++ b/rest/services/workflow_service.py @@ -78,11 +78,11 @@ def create_workflow( new_workflow = Workflow( name=body.workflow.name, uuid_name=workflow_id, - created_at=datetime.utcnow(), + created_at=datetime.now(), schema=body.forageSchema, ui_schema=body.ui_schema.model_dump(), created_by=auth_context.user_id, - last_changed_at=datetime.utcnow(), + last_changed_at=datetime.now(), start_date=body.workflow.start_date, end_date=body.workflow.end_date, schedule=body.workflow.schedule,