Merge pull request #3791 from alphagov/compare-broadcasts-no-updated-at

Allow broadcasts which have no created_at to be compared
This commit is contained in:
Katie Smith
2021-02-09 09:52:29 +00:00
committed by GitHub

View File

@@ -49,6 +49,8 @@ class BroadcastMessage(JSONModel):
return self.updated_at < other.created_at
if not self.updated_at and other.updated_at:
return self.created_at < other.updated_at
if not self.updated_at and not other.updated_at:
return self.created_at < other.created_at
return self.updated_at < other.updated_at
@classmethod