Skip to content

Commit

Permalink
chore:update consume_service.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jingooo5 committed Nov 2, 2024
1 parent 2b861fc commit ddce3ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Service/consume_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ def purchase_history_save(data : ConsumeHistory):

def get_consume_histories_by_item_id(item_id: str):
with get_db() as db:
return db.query(ConsumeHistory).filter(ConsumeHistory.item_id == item_id).all()
return db.query(ConsumeHistory).filter(ConsumeHistory.item_id == item_id).order_by(ConsumeHistory.date.asc()).all()

0 comments on commit ddce3ef

Please sign in to comment.