Skip to content

Commit

Permalink
Handle case when token has a null expires
Browse files Browse the repository at this point in the history
  • Loading branch information
paltman committed Oct 26, 2011
1 parent 4bdb9e8 commit 6e63830
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion oauth_access/models.py
Expand Up @@ -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.