Permalink
Browse files

Handle case when token has a null expires

  • Loading branch information...
paltman committed Oct 26, 2011
1 parent 4bdb9e8 commit 6e6383037fc86beba36f16e9beb89e850ba24649
Showing with 3 additions and 1 deletion.
  1. +3 −1 oauth_access/models.py
View
@@ -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.