From 77b19abd74aedb294d9003e9070df66fa2e5c446 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sun, 9 Feb 2014 05:06:37 +0000 Subject: [PATCH] only return requested keys --- pandora/edit/models.py | 1 - pandora/edit/views.py | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora/edit/models.py b/pandora/edit/models.py index f2f270221..475d01cfe 100644 --- a/pandora/edit/models.py +++ b/pandora/edit/models.py @@ -312,7 +312,6 @@ class Edit(models.Model): 'user', ] response = { - 'type': self.type } _map = { 'posterFrames': 'poster_frames' diff --git a/pandora/edit/views.py b/pandora/edit/views.py index 7292ef126..cb64e3369 100644 --- a/pandora/edit/views.py +++ b/pandora/edit/views.py @@ -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: