Skip to content

Commit

Permalink
Order merged pipelines in get_merged_run
Browse files Browse the repository at this point in the history
So that the correct one is returned.
  • Loading branch information
lbarcziova committed Jun 25, 2024
1 parent 8e46036 commit bf2890b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packit_service/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
null,
case,
Table,
asc,
)
from sqlalchemy.dialects.postgresql import array as psql_array
from sqlalchemy.ext.declarative import declarative_base
Expand Down Expand Up @@ -1571,6 +1572,7 @@ def get_merged_run(cls, first_id: int) -> Optional[Iterable["PipelineModel"]]:
else_=PipelineModel.id,
),
)
.order_by(asc("merged_id"))
.first()
)

Expand Down

0 comments on commit bf2890b

Please sign in to comment.