Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
grapediadb committed Sep 21, 2018
1 parent 1f0f83b commit 9e682e2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build
Original file line number Diff line number Diff line change
@@ -1 +1 @@
bfa31ce6
1f0f83b9
7 changes: 6 additions & 1 deletion command/lib/utils/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,12 @@ def func_wrapper(*args, **kwargs):
request = args[0]
if request.user.is_staff and request.user.is_superuser:
return func(*args, **kwargs)
comp_id = request.POST['compendium_id']
comp_id = None
if 'request' in request.POST:
req = json.loads(request.POST['request'])
comp_id = req['compendium_id']
elif 'compendium_id' in request.POST:
comp_id = request.POST['compendium_id']
compendium = CompendiumDatabase.objects.get(id=comp_id)
for g in request.user.groups.all():
for p in g.permissions.all():
Expand Down

0 comments on commit 9e682e2

Please sign in to comment.