Merge pull request #58 from Sjord/userconsent-unique-client-user

Make (user, client) unique on UserConsent
This commit is contained in:
Juan Ignacio Fiorentino 2015-11-10 14:43:09 -03:00
commit 2d1e246b2c
2 changed files with 20 additions and 2 deletions

View file

@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('oidc_provider', '0005_token_refresh_token'),
]
operations = [
migrations.AlterUniqueTogether(
name='userconsent',
unique_together=set([('user', 'client')]),
),
]

View file

@ -89,5 +89,5 @@ class Token(BaseCodeTokenModel):
class UserConsent(BaseCodeTokenModel):
pass
class Meta:
unique_together = ('user', 'client')