From 1f09592b4da59e6c18ee4fbb51447d0fb91e18fd Mon Sep 17 00:00:00 2001 From: Dan Date: Thu, 29 Dec 2022 13:49:41 -0500 Subject: [PATCH] Don't freak out if git is not yet setup in the working directory. --- .../spiffworkflow_backend/routes/process_api_blueprint.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/routes/process_api_blueprint.py b/spiffworkflow-backend/src/spiffworkflow_backend/routes/process_api_blueprint.py index c711df4fe..e63a576c8 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/routes/process_api_blueprint.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/routes/process_api_blueprint.py @@ -79,7 +79,7 @@ from spiffworkflow_backend.routes.user import verify_token from spiffworkflow_backend.services.authorization_service import AuthorizationService from spiffworkflow_backend.services.error_handling_service import ErrorHandlingService from spiffworkflow_backend.services.file_system_service import FileSystemService -from spiffworkflow_backend.services.git_service import GitService +from spiffworkflow_backend.services.git_service import GitService, GitCommandError from spiffworkflow_backend.services.message_service import MessageService from spiffworkflow_backend.services.process_instance_processor import ( ProcessInstanceProcessor, @@ -976,7 +976,10 @@ def _get_process_instance( ) -> flask.wrappers.Response: """_get_process_instance.""" process_model_identifier = modified_process_model_identifier.replace(":", "/") - current_version_control_revision = GitService.get_current_revision() + try: + current_version_control_revision = GitService.get_current_revision() + except GitCommandError: + current_version_control_revision = "" process_model_with_diagram = None name_of_file_with_diagram = None