diff --git a/server/szurubooru/db/tag.py b/server/szurubooru/db/tag.py index 90cb0e4..3188739 100644 --- a/server/szurubooru/db/tag.py +++ b/server/szurubooru/db/tag.py @@ -48,7 +48,11 @@ class Tag(Base): last_edit_time = Column('last_edit_time', DateTime) category = relationship('TagCategory', lazy='joined') - names = relationship('TagName', cascade='all, delete-orphan', lazy='joined') + names = relationship( + 'TagName', + cascade='all,delete-orphan', + lazy='joined', + order_by='TagName.tag_name_id') suggestions = relationship( 'Tag', secondary='tag_suggestion',