From 44c6e8defb145e32f50976a1eb0e47a58caf52e0 Mon Sep 17 00:00:00 2001 From: westsaharut Date: Fri, 25 Oct 2019 14:24:09 +0700 Subject: [PATCH] Update models.py I can't migrate because haven't related_name='+' --- oidc_provider/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/oidc_provider/models.py b/oidc_provider/models.py index 45d66dc2..4dacc08f 100644 --- a/oidc_provider/models.py +++ b/oidc_provider/models.py @@ -184,7 +184,7 @@ def has_expired(self): class Code(BaseCodeTokenModel): user = models.ForeignKey( - settings.AUTH_USER_MODEL, verbose_name=_(u'User'), on_delete=models.CASCADE) + settings.AUTH_USER_MODEL, verbose_name=_(u'User'), on_delete=models.CASCADE, related_name='+') code = models.CharField(max_length=255, unique=True, verbose_name=_(u'Code')) nonce = models.CharField(max_length=255, blank=True, default='', verbose_name=_(u'Nonce')) is_authentication = models.BooleanField(default=False, verbose_name=_(u'Is Authentication?')) @@ -239,7 +239,7 @@ def at_hash(self): class UserConsent(BaseCodeTokenModel): user = models.ForeignKey( - settings.AUTH_USER_MODEL, verbose_name=_(u'User'), on_delete=models.CASCADE) + settings.AUTH_USER_MODEL, verbose_name=_(u'User'), on_delete=models.CASCADE, related_name='+') date_given = models.DateTimeField(verbose_name=_(u'Date Given')) class Meta: