mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-07-25 12:01:04 +02:00
fix: review comments
This commit is contained in:
parent
c2541d088b
commit
8c9938bde1
5 changed files with 119 additions and 8 deletions
|
|
@ -10,6 +10,7 @@ from api.db.filters import apply_workflow_run_filters, get_workflow_run_order_cl
|
|||
from api.db.models import (
|
||||
OrganizationModel,
|
||||
UserModel,
|
||||
WorkflowDefinitionModel,
|
||||
WorkflowModel,
|
||||
WorkflowRunModel,
|
||||
)
|
||||
|
|
@ -53,6 +54,14 @@ class WorkflowRunClient(BaseDBClient):
|
|||
if not workflow:
|
||||
raise ValueError(f"Workflow with ID {workflow_id} not found")
|
||||
|
||||
if definition_id is not None:
|
||||
definition = await session.get(WorkflowDefinitionModel, definition_id)
|
||||
if not definition or definition.workflow_id != workflow.id:
|
||||
raise ValueError(
|
||||
f"Workflow definition {definition_id} does not belong to "
|
||||
f"workflow {workflow.id}"
|
||||
)
|
||||
|
||||
# Get the current storage backend based on ENABLE_AWS_S3 flag
|
||||
current_backend = StorageBackend.get_current_backend()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue