diff --git a/api/models/category.py b/api/models/category.py index e90edd4..b2ceab7 100644 --- a/api/models/category.py +++ b/api/models/category.py @@ -11,6 +11,8 @@ class Category(db.Model): texts = db.relationship( 'CategoryTexts', backref='category', lazy='dynamic') + __mapper_args__ = {'order_by' : name.asc()} + def path(self, locale='sv_SE'): row = CategoryTreeI18n.query.filter_by( category_id=self.id, locale=locale).first()