fix unique constraint check for project perm

This commit is contained in:
Élie Bouttier 2014-08-30 17:27:58 -07:00
parent 5e6bd1a4ef
commit c394bc17d9
4 changed files with 9 additions and 6 deletions

View file

@ -62,7 +62,9 @@ class ProjectPermissionForm(PermissionForm):
class Meta:
model = ProjectPermission
fields = [ 'grantee_type', 'grantee_id' ]
# project is required for the unicity check
fields = [ 'project', 'grantee_type', 'grantee_id' ]
widgets = {
'project': HiddenInput,
'grantee_id': HiddenInput,
}