Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
itminedu
synnefo
Commits
5e5551d8
Commit
5e5551d8
authored
May 10, 2016
by
Olga Brani
Committed by
Giorgos Korfiatis
Jun 30, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
admin: Extend 'do_action' to accept extra params
parent
54f7407f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
snf-admin-app/synnefo_admin/admin/views.py
snf-admin-app/synnefo_admin/admin/views.py
+5
-4
No files found.
snf-admin-app/synnefo_admin/admin/views.py
View file @
5e5551d8
...
...
@@ -308,9 +308,9 @@ def admin_actions(request):
target
=
objs
[
'target'
]
op
=
objs
[
'op'
]
i
d
s
=
objs
[
'ids'
]
i
f
type
(
ids
)
is
not
list
:
ids
=
ids
.
replace
(
'['
,
''
).
replace
(
']'
,
''
).
replace
(
' '
,
''
).
split
(
','
)
i
tem
s
=
json
.
loads
(
objs
[
'ids'
]
)
i
ds
=
[
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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment