server/tag-categories: sort responses by order

This commit is contained in:
Shyam Sunder 2020-09-24 22:50:28 -04:00
parent a896c1a5a7
commit 697bd45420

View file

@ -152,7 +152,7 @@ def get_all_category_names() -> List[str]:
def get_all_categories() -> List[model.TagCategory]: def get_all_categories() -> List[model.TagCategory]:
return ( return (
db.session.query(model.TagCategory) db.session.query(model.TagCategory)
.order_by(model.TagCategory.name.asc()) .order_by(model.TagCategory.order.asc(), model.TagCategory.name.asc())
.all() .all()
) )