mirror of
https://github.com/evennia/evennia.git
synced 2026-03-29 20:17:16 +02:00
Add __lt__ method necessary for usage of sorted() later in the file.
This commit is contained in:
parent
be5ecf0d0d
commit
a4b902108c
1 changed files with 3 additions and 0 deletions
|
|
@ -66,6 +66,9 @@ class Tag(models.Model):
|
|||
unique_together = (('db_key', 'db_category', 'db_tagtype', 'db_model'),)
|
||||
index_together = (('db_key', 'db_category', 'db_tagtype', 'db_model'),)
|
||||
|
||||
def __lt__(self, other):
|
||||
return str(self) < str(other)
|
||||
|
||||
def __unicode__(self):
|
||||
return "<Tag: %s%s>" % (self.db_key, "(category:%s)" % self.db_category if self.db_category else "")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue