server/posts: fix comments order
This commit is contained in:
parent
616854fb1b
commit
b13f9dcb68
1 changed files with 3 additions and 1 deletions
|
@ -113,7 +113,9 @@ def serialize_post(post, authenticated_user, options=None):
|
||||||
key=lambda x: x['polygon']),
|
key=lambda x: x['polygon']),
|
||||||
'comments': lambda: [
|
'comments': lambda: [
|
||||||
comments.serialize_comment(comment, authenticated_user) \
|
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),
|
'snapshots': lambda: snapshots.get_serialized_history(post),
|
||||||
},
|
},
|
||||||
options)
|
options)
|
||||||
|
|
Loading…
Reference in a new issue