Commits

Dmitri Lebedev committed 9ceb6d4

key error

Comments (0)

Files changed (1)

example/django_inline/views.py

     Checks user permissions and saves the data in the model.
     """
     if request.user.has_perm('%s.can_edit' % obj.__class__.__name__, obj):
-        setattr(obj, field_name, request.POST['data'])
+        setattr(obj, field_name, request.POST['value'])
         obj.save()
 
     return HttpResponse(getattr(obj, field_name))