Fixes #1021: Corrected evaluation of API token expiration time

This commit is contained in:
Jeremy Stretch
2017-03-31 11:13:37 -04:00
parent 24b4127743
commit 00f0ea3e77
2 changed files with 4 additions and 4 deletions

View File

@@ -39,6 +39,6 @@ class Token(models.Model):
@property
def is_expired(self):
if self.expires is not None and timezone.now() > self.expires:
return True
return False
if self.expires is None or timezone.now() < self.expires:
return False
return True