Ticket #2362: diff_update_object_onetoonefield.txt

File diff_update_object_onetoonefield.txt, 1.2 KB (added by marcink@…, 9 years ago)
Line 
1Index: create_update.py
2===================================================================
3--- create_update.py    (revision 3354)
4+++ create_update.py    (working copy)
5@@ -102,7 +102,7 @@
6     except ObjectDoesNotExist:
7         raise Http404, "No %s found for %s" % (model._meta.verbose_name, lookup_kwargs)
8 
9-    manipulator = model.ChangeManipulator(getattr(object, object._meta.pk.name), follow=follow)
10+    manipulator = model.ChangeManipulator(getattr(object, object._meta.pk.column), follow=follow)
11 
12     if request.POST:
13         new_data = request.POST.copy()
14@@ -142,7 +142,7 @@
15         else:
16             c[key] = value
17     response = HttpResponse(t.render(c))
18-    populate_xheaders(request, response, model, getattr(object, object._meta.pk.name))
19+    populate_xheaders(request, response, model, getattr(object, object._meta.pk.column))
20     return response
21 
22 def delete_object(request, model, post_delete_redirect,
23@@ -196,5 +196,5 @@
24             else:
25                 c[key] = value
26         response = HttpResponse(t.render(c))
27-        populate_xheaders(request, response, model, getattr(object, object._meta.pk.name))
28+        populate_xheaders(request, response, model, getattr(object, object._meta.pk.column))
29         return response
Back to Top