Code

Ticket #1674: pkgenviewupd.diff

File pkgenviewupd.diff, 544 bytes (added by pmd@…, 8 years ago)
Line 
1Index: create_update.py
2===================================================================
3--- create_update.py    (revision 2726)
4+++ create_update.py    (working copy)
5@@ -101,7 +101,8 @@
6     except ObjectDoesNotExist:
7         raise Http404, "No %s found for %s" % (model._meta.verbose_name, lookup_kwargs)
8 
9-    manipulator = model.ChangeManipulator(object.id, follow=follow)
10+    manipulator = model.ChangeManipulator(getattr(object, object._meta.pk.name),
11+                                       follow=follow)
12 
13     if request.POST:
14         new_data = request.POST.copy()