return new item data

This commit is contained in:
j 2011-10-24 21:07:28 +02:00
parent 27b11d0ce9
commit 0c702c96f2
2 changed files with 2 additions and 2 deletions

View file

@ -209,8 +209,7 @@ class Item(models.Model):
group, created = Group.objects.get_or_create(name=g) group, created = Group.objects.get_or_create(name=g)
self.groups.add(group) self.groups.add(group)
for key in data: for key in data:
if key != 'id': self.data[key] = data[key]
self.data[key] = data[key]
self.save() self.save()
def update_external(self): def update_external(self):

View file

@ -449,6 +449,7 @@ def edit(request):
item.level = data['rightsLevel'] item.level = data['rightsLevel']
del data['rightsLevel'] del data['rightsLevel']
item.edit(data) item.edit(data)
response['data'] = item.get_json()
else: else:
response = json_response(status=403, text='permissino denied') response = json_response(status=403, text='permissino denied')
return render_to_json_response(response) return render_to_json_response(response)