fix orther without id

This commit is contained in:
Cayo Puigdefabregas 2022-11-30 10:23:51 +01:00
parent c263dc0ae0
commit b1ad7b151d
1 changed files with 3 additions and 1 deletions

View File

@ -172,7 +172,9 @@ class TradeDocument(Thing):
return sorted(ev for ev in actions if ev.severity >= Severity.Warning)
def __lt__(self, other):
if self.id and other.id:
return self.id < other.id
return False
def __str__(self) -> str:
return '{0.file_name}'.format(self)