From 5fa00f952491677d45098ede97bfc1c1bd639e01 Mon Sep 17 00:00:00 2001 From: Dan Date: Wed, 21 Dec 2022 12:52:56 -0500 Subject: [PATCH] Do not require a Git Repository to start a process. --- .../services/process_instance_service.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_service.py b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_service.py index e933eda91..3427b47bb 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_service.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_service.py @@ -17,7 +17,7 @@ from spiffworkflow_backend.models.task import MultiInstanceType from spiffworkflow_backend.models.task import Task from spiffworkflow_backend.models.user import UserModel from spiffworkflow_backend.services.authorization_service import AuthorizationService -from spiffworkflow_backend.services.git_service import GitService +from spiffworkflow_backend.services.git_service import GitService, GitCommandError from spiffworkflow_backend.services.process_instance_processor import ( ProcessInstanceProcessor, ) @@ -36,7 +36,10 @@ class ProcessInstanceService: user: UserModel, ) -> ProcessInstanceModel: """Get_process_instance_from_spec.""" - current_git_revision = GitService.get_current_revision() + try: + current_git_revision = GitService.get_current_revision() + except GitCommandError as ge: + current_git_revision = "" process_instance_model = ProcessInstanceModel( status=ProcessInstanceStatus.not_started.value, process_initiator=user,