Skip to content

Commit

Permalink
Return last Car entry to custody
Browse files Browse the repository at this point in the history
  • Loading branch information
Smehnov committed Oct 5, 2023
1 parent d51654c commit 22b9a50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion storage/web/routers/internal/filecoin.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class CarsWithActiveDeals(BaseModel):
@router.get(".getCarToProcess")
async def get_car_to_process(authed=Depends(deps.get_app_by_admin_token)):
with with_db() as db:
car = db.query(Car).filter(Car.comm_p.is_(None)).last()
car = db.query(Car).filter(Car.comm_p.is_(None)).order_by(Car.id).last()
if car:
return {
"pack_uuid": car.pack_uuid,
Expand Down

0 comments on commit 22b9a50

Please sign in to comment.