Code

Ticket #6323: change_view_patch.diff

File change_view_patch.diff, 598 bytes (added by chrj, 6 years ago)
Line 
1Index: django/contrib/admin/options.py
2===================================================================
3--- django/contrib/admin/options.py     (revision 6993)
4+++ django/contrib/admin/options.py     (working copy)
5@@ -536,7 +536,7 @@
6         app_label = opts.app_label
7 
8         try:
9-            obj = model._default_manager.get(pk=object_id)
10+            obj = self.queryset_change(request).get(pk=object_id)
11         except model.DoesNotExist:
12             # Don't raise Http404 just yet, because we haven't checked
13             # permissions yet. We don't want an unauthenticated user to be able