only return requested keys
This commit is contained in:
parent
d89dd35892
commit
77b19abd74
2 changed files with 2 additions and 2 deletions
|
@ -312,7 +312,6 @@ class Edit(models.Model):
|
|||
'user',
|
||||
]
|
||||
response = {
|
||||
'type': self.type
|
||||
}
|
||||
_map = {
|
||||
'posterFrames': 'poster_frames'
|
||||
|
|
|
@ -201,6 +201,7 @@ def getEdit(request):
|
|||
'''
|
||||
takes {
|
||||
id:
|
||||
keys: []
|
||||
}
|
||||
returns {
|
||||
id:
|
||||
|
@ -212,7 +213,7 @@ def getEdit(request):
|
|||
response = json_response()
|
||||
edit = get_edit_or_404_json(data['id'])
|
||||
if edit.accessible(request.user):
|
||||
response['data'] = edit.json(user=request.user)
|
||||
response['data'] = edit.json(keys=data.get('keys'), user=request.user)
|
||||
else:
|
||||
response = json_response(status=403, text='not allowed')
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue