Skip to content
Browse files

Handle case when token has a null expires

  • Loading branch information...
1 parent 4bdb9e8 commit 6e6383037fc86beba36f16e9beb89e850ba24649 @paltman paltman committed
Showing with 3 additions and 1 deletion.
  1. +3 −1 oauth_access/models.py
View
4 oauth_access/models.py
@@ -17,4 +17,6 @@ class Meta:
unique_together = [("user", "service")]
def expired(self):
- return self.expires and datetime.datetime.now() < self.expires
+ if not self.expires:
+ return True
+ return datetime.datetime.now() < self.expires

0 comments on commit 6e63830

Please sign in to comment.
Something went wrong with that request. Please try again.