git://git.onelab.eu
/
plstackapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c7e6700
)
expect role object
author
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Mon, 8 Apr 2013 20:17:11 +0000
(16:17 -0400)
committer
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Mon, 8 Apr 2013 20:17:11 +0000
(16:17 -0400)
plstackapi/planetstack/views/roles.py
patch
|
blob
|
history
diff --git
a/plstackapi/planetstack/views/roles.py
b/plstackapi/planetstack/views/roles.py
index
3222f5e
..
2374448
100644
(file)
--- a/
plstackapi/planetstack/views/roles.py
+++ b/
plstackapi/planetstack/views/roles.py
@@
-17,8
+17,8
@@
class RoleListCreate(APIView):
data = parse_request(request.DATA)
if 'auth' not in data:
return Response(status=status.HTTP_400_BAD_REQUEST)
- elif '
nam
e' in data:
- role = add_role(data['auth'], data['name'])
+ elif '
rol
e' in data:
+ role = add_role(data['auth'], data['
role']['
name'])
serializer = RoleSerializer(data=role)
return Response(serializer.data, status=status.HTTP_201_CREATED)
else: