0002-create-unique-index-on-AccessRight.-13887.patch
passerelle/base/migrations/0004_auto_20170117_0326.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 |
from django.db import models, migrations |
|
5 | ||
6 | ||
7 |
class Migration(migrations.Migration): |
|
8 | ||
9 |
dependencies = [ |
|
10 |
('base', '0003_auto_20170116_1656'), |
|
11 |
] |
|
12 | ||
13 |
operations = [ |
|
14 |
migrations.AlterUniqueTogether( |
|
15 |
name='accessright', |
|
16 |
unique_together=set([('codename', 'resource_type', 'resource_pk', 'apiuser')]), |
|
17 |
), |
|
18 |
] |
passerelle/base/models.py | ||
---|---|---|
167 | 167 |
permissions = ( |
168 | 168 |
('view_accessright', 'Can view access right'), |
169 | 169 |
) |
170 |
unique_together = ( |
|
171 |
('codename', 'resource_type', 'resource_pk', 'apiuser'), |
|
172 |
) |
|
170 | 173 | |
171 | 174 |
def __unicode__(self): |
172 | 175 |
return '%s (on %s <%s>) (for %s)' % (self.codename, |
173 |
- |