Skip to content

Commit

Permalink
statements 정렬 기준 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
onaries committed Feb 10, 2024
1 parent 20a1d01 commit c688145
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,9 @@ async def get_statements(
if sort == "id":
sort = "statements_id"

statement_list = statement_list.order_by(text(f"{sort} {order}"))
statement_list = statement_list.order_by(
text(f"{sort} {order}"), text("statements_id desc")
)

return paginate(db, statement_list)

Expand Down

0 comments on commit c688145

Please sign in to comment.