Skip to content

Commit 167c6c3

Browse files
committed
relax user constraint on AbstractApplication model
1 parent 9b28c9e commit 167c6c3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

oauth2_provider/models.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ class AbstractApplication(models.Model):
5959

6060
client_id = models.CharField(max_length=100, unique=True,
6161
default=generate_client_id, db_index=True)
62-
user = models.ForeignKey(settings.AUTH_USER_MODEL, related_name="%(app_label)s_%(class)s")
62+
user = models.ForeignKey(settings.AUTH_USER_MODEL, related_name="%(app_label)s_%(class)s",
63+
null=True, blank=True)
64+
6365
help_text = _("Allowed URIs list, space separated")
6466
redirect_uris = models.TextField(help_text=help_text,
6567
validators=[validate_uris], blank=True)

0 commit comments

Comments
 (0)