Commit 5e5551d8 authored by Olga Brani's avatar Olga Brani Committed by Giorgos Korfiatis

admin: Extend 'do_action' to accept extra params

parent 54f7407f
......@@ -308,9 +308,9 @@ def admin_actions(request):
target = objs['target']
op = objs['op']
ids = objs['ids']
if type(ids) is not list:
ids = ids.replace('[', '').replace(']', '').replace(' ', '').split(',')
items = json.loads(objs['ids'])
ids = [item['id'] for item in items]
try:
mod = get_view_module_or_404(target)
......@@ -318,7 +318,8 @@ def admin_actions(request):
status = 404
response['result'] = "You have requested an unknown operation."
for id in ids:
for item in items:
id = item['id']
try:
mod.do_action(request, op, id)
except faults.BadRequest as e:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment