Skip to content

Commit 6b5d91a

Browse files
committed
изменения в order_by
1 parent ddc3bcb commit 6b5d91a

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

rating_api/routes/comment.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,13 +207,12 @@ async def get_comments(
207207
.filter(Comment.search_by_lectorer_id(lecturer_id))
208208
.filter(Comment.search_by_user_id(user_id))
209209
.order_by(
210-
Comment.order_by_create_ts(order_by, asc_order)
210+
Comment.order_by_mark(order_by, asc_order)
211211
if "mark" in order_by
212-
else Comment.order_by_mark(order_by, asc_order)
212+
else Comment.order_by_create_ts(order_by, asc_order)
213213
)
214214
)
215215

216-
print(comments_query.statement.compile())
217216
comments = comments_query.limit(limit).offset(offset).all()
218217

219218
if not comments:

0 commit comments

Comments
 (0)