Skip to content

Commit

Permalink
Update models.py
Browse files Browse the repository at this point in the history
I can't migrate because haven't related_name='+'
  • Loading branch information
westsaharut authored and juanifioren committed May 11, 2023
1 parent eeebb8c commit d305f5b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions oidc_provider/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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?'))
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit d305f5b

Please sign in to comment.