Provide a class magic method for proper sorting.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -33,6 +33,9 @@ class EventTypeNamespace(object):
|
|||||||
self.event_types = []
|
self.event_types = []
|
||||||
self.__class__._registry[name] = self
|
self.__class__._registry[name] = self
|
||||||
|
|
||||||
|
def __lt__(self, other):
|
||||||
|
return self.label < other.label
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return force_text(self.label)
|
return force_text(self.label)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user