Let Tag objects be sortable using their name.

This commit is contained in:
voussoir 2020-10-17 17:55:36 -07:00
parent 938f8239c7
commit c278f3e0af

View file

@ -1246,6 +1246,9 @@ class Tag(ObjectBase, GroupableMixin):
self.group_getter_many = self.photodb.get_tags_by_id self.group_getter_many = self.photodb.get_tags_by_id
def __lt__(self, other):
return self.name < other.name
def __repr__(self): def __repr__(self):
return f'Tag:{self.id}:{self.name}' return f'Tag:{self.id}:{self.name}'