From 0c702c96f2b98b5f2df79fa838c9dc7fc0863599 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Mon, 24 Oct 2011 21:07:28 +0200 Subject: [PATCH] return new item data --- pandora/item/models.py | 3 +-- pandora/item/views.py | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora/item/models.py b/pandora/item/models.py index 9f4c59f52..73faaa411 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -209,8 +209,7 @@ class Item(models.Model): group, created = Group.objects.get_or_create(name=g) self.groups.add(group) for key in data: - if key != 'id': - self.data[key] = data[key] + self.data[key] = data[key] self.save() def update_external(self): diff --git a/pandora/item/views.py b/pandora/item/views.py index e52d394a0..d11abf1ac 100644 --- a/pandora/item/views.py +++ b/pandora/item/views.py @@ -449,6 +449,7 @@ def edit(request): item.level = data['rightsLevel'] del data['rightsLevel'] item.edit(data) + response['data'] = item.get_json() else: response = json_response(status=403, text='permissino denied') return render_to_json_response(response)