Skip to content

Commit a82078b

Browse files
committed
feat: use default pipeline in project settings first
1 parent 6bc4cad commit a82078b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ami/ml/orchestration/pipelines.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ def get_default_pipeline(project: Project) -> Pipeline | None:
1313
1414
@TODO use project settings to determine the default pipeline
1515
"""
16-
return (
16+
default_pipeline = project.default_processing_pipeline or (
1717
Pipeline.objects.all()
1818
.enabled(project=project) # type: ignore
1919
.online(project=project) # type: ignore
2020
.annotate(num_categories=models.Count("algorithms__category_map__labels"))
2121
.order_by("-num_categories", "-created_at")
2222
.first()
2323
)
24+
return default_pipeline

0 commit comments

Comments
 (0)