Do not require a Git Repository to start a process.

This commit is contained in:
Dan 2022-12-21 12:52:56 -05:00
parent 9d3aec8c20
commit 5fa00f9524
1 changed files with 5 additions and 2 deletions

View File

@ -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."""
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,