Merge pull request #504 from oasis-open/sighting_last_seen

Fix sighting.last_seen check
pull/1/head
Rich Piazza 2021-07-06 17:19:17 -04:00 committed by GitHub
commit 55808d9747
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -91,7 +91,7 @@ class Campaign(_DomainObject):
last_seen = self.get('last_seen')
if first_seen and last_seen and last_seen < first_seen:
msg = "{0.id} 'last_seen' must be greater than or equal 'first_seen'"
msg = "{0.id} 'last_seen' must be greater than or equal to 'first_seen'"
raise ValueError(msg.format(self))

View File

@ -111,6 +111,6 @@ class Sighting(_RelationshipObject):
first_seen = self.get('first_seen')
last_seen = self.get('last_seen')
if first_seen and last_seen and last_seen <= first_seen:
msg = "{0.id} 'last_seen' must be later than 'first_seen'"
if first_seen and last_seen and last_seen < first_seen:
msg = "{0.id} 'last_seen' must be greater than or equal to 'first_seen'"
raise ValueError(msg.format(self))