Skip to content

Commit

Permalink
16: Fix typing issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
lfse-slafleur committed Apr 17, 2024
1 parent fe48b97 commit fc5c44c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/omotes_rest/rest_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,13 @@ def cancel_job(self, job_id: uuid.UUID) -> bool:
"""
job_in_db = self.get_job(job_id)

workflow_type = self.workflow_type_manager.get_workflow_by_name(
FRONTEND_NAME_TO_OMOTES_WORKFLOW_NAME[job_in_db.workflow_type]
)
if not workflow_type:
raise RuntimeError(f"Unknown workflow type {job_in_db.workflow_type}")

if job_in_db:
workflow_type = self.workflow_type_manager.get_workflow_by_name(
FRONTEND_NAME_TO_OMOTES_WORKFLOW_NAME[job_in_db.workflow_type]
)
if not workflow_type:
raise RuntimeError(f"Unknown workflow type {job_in_db.workflow_type}")

job = Job(id=job_id, workflow_type=workflow_type)
self.omotes_if.cancel_job(job)
result = True
Expand Down

0 comments on commit fc5c44c

Please sign in to comment.