Skip to content

Commit

Permalink
Order merged pipelines in get_merged_run (#2452)
Browse files Browse the repository at this point in the history
Order merged pipelines in get_merged_run

So that the correct one is returned.
I hope this could help with packit/dashboard#417 (comment), but wasn't able to test it locally.
RELEASE NOTES BEGIN
N/A
RELEASE NOTES END

Reviewed-by: Matej Focko
  • Loading branch information
softwarefactory-project-zuul[bot] authored Jun 25, 2024
2 parents 8e46036 + bf2890b commit e0fc2f5
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 e0fc2f5

Please sign in to comment.