Let Tag objects be sortable using their name.
This commit is contained in:
parent
938f8239c7
commit
c278f3e0af
1 changed files with 3 additions and 0 deletions
|
@ -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}'
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue