only return requested keys

This commit is contained in:
j 2014-02-09 05:06:37 +00:00
parent d89dd35892
commit 77b19abd74
2 changed files with 2 additions and 2 deletions

View file

@ -312,7 +312,6 @@ class Edit(models.Model):
'user',
]
response = {
'type': self.type
}
_map = {
'posterFrames': 'poster_frames'

View file

@ -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: