server/tags: fix nondeterministic siblings order

This commit is contained in:
rr- 2017-04-24 22:48:11 +02:00
parent 8e5798ab8c
commit 467b4a7630
1 changed files with 1 additions and 0 deletions

View File

@ -256,6 +256,7 @@ def get_tag_siblings(tag: model.Tag) -> List[model.Tag]:
.filter(pt_alias1.tag_id != tag.tag_id) .filter(pt_alias1.tag_id != tag.tag_id)
.group_by(tag_alias.tag_id) .group_by(tag_alias.tag_id)
.order_by(sa.func.count(pt_alias2.post_id).desc()) .order_by(sa.func.count(pt_alias2.post_id).desc())
.order_by(tag_alias.first_name)
.limit(50)) .limit(50))
return result return result