aboutsummaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorrr-2016-06-11 14:18:33 +0200
committerrr-2016-06-11 17:36:02 +0200
commitb13f9dcb68ba5d1a677dded9c6f1cd5b2e8e6a92 (patch)
treed938b0065c23320d7f023f99192323645f5992c8 /server
parent616854fb1bc891b16f5b5276352dcb2c054d7e36 (diff)
server/posts: fix comments order
Diffstat (limited to 'server')
-rw-r--r--server/szurubooru/func/posts.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/szurubooru/func/posts.py b/server/szurubooru/func/posts.py
index 638193c..902680b 100644
--- a/server/szurubooru/func/posts.py
+++ b/server/szurubooru/func/posts.py
@@ -113,7 +113,9 @@ def serialize_post(post, authenticated_user, options=None):
key=lambda x: x['polygon']),
'comments': lambda: [
comments.serialize_comment(comment, authenticated_user) \
- for comment in post.comments],
+ for comment in sorted(
+ post.comments,
+ key=lambda comment: comment.creation_time)],
'snapshots': lambda: snapshots.get_serialized_history(post),
},
options)

© 2015 - 2026 Jakob L. Kreuze