forked from 0x2620/pandora
return new item data
This commit is contained in:
parent
27b11d0ce9
commit
0c702c96f2
2 changed files with 2 additions and 2 deletions
|
@ -209,7 +209,6 @@ 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()
|
||||||
|
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue