Skip to content

Commit

Permalink
Merge pull request #345 from CTPUG/bugs/fix_add_groups
Browse files Browse the repository at this point in the history
Handle non-unique permissions the same as other permission errors, rather than breaking later
  • Loading branch information
drnlm committed Jan 31, 2017
2 parents 232dbe5 + f65477a commit 75e0668
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions wafer/management/commands/wafer_add_default_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def add_wafer_groups(self):
continue
except Permission.MultipleObjectsReturned:
print('Non-unique permission %s' % perm_code)
continue
if perm not in group.permissions.all():
print('Adding %s to %s' % (perm_code, wafer_group))
group.permissions.add(perm)
Expand Down

0 comments on commit 75e0668

Please sign in to comment.