Don't freak out if git is not yet setup in the working directory.

This commit is contained in:
Dan 2022-12-29 13:49:41 -05:00
parent 744460fdbf
commit 1f09592b4d
1 changed files with 5 additions and 2 deletions

View File

@ -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