X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/18aa8ca52202003e5628a882f3469a04d905cc05..7bbeecb5dd5c5f20120f9e40e41568a3bff1caa4:/src/api/models.py?ds=sidebyside diff --git a/src/api/models.py b/src/api/models.py index 04d08e96d..ff1f09a0d 100644 --- a/src/api/models.py +++ b/src/api/models.py @@ -112,7 +112,7 @@ class Token(models.Model): settings.AUTH_USER_MODEL, models.CASCADE, null=True, blank=True, related_name='tokens' ) - consumer = models.ForeignKey(Consumer, models.CASCADE) + consumer = models.ForeignKey(Consumer, models.CASCADE, null=True, blank=True) def __str__(self): return "%s Token %s for %s" % (self.get_token_type_display(), self.key, self.consumer)