Skip to content

Commit

Permalink
Merge pull request #372 from helxplatform/fix/identity-token-bug
Browse files Browse the repository at this point in the history
fix bug with expiry default constraint
  • Loading branch information
Hoid authored Oct 9, 2024
2 parents 1aae5ba + 2c65c6a commit db6cfa8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion appstore/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class UserIdentityToken(models.Model):
token = models.CharField(max_length=256, unique=True, default=generate_token)
# Optionally, identify the consumer (probably an app) whom the token was generated for.
consumer_id = models.CharField(max_length=256, default=None, null=True)
expires = models.DateTimeField(default=timezone.now() + timedelta(days=31))
expires = models.DateTimeField(default=lambda: timezone.now() + timedelta(days=31))

@property
def valid(self):
Expand Down

0 comments on commit db6cfa8

Please sign in to comment.