diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py
index 3b26f7b..23a355a 100644
a
|
b
|
class ModelAdmin(BaseModelAdmin):
|
523 | 523 | app_label = opts.app_label |
524 | 524 | |
525 | 525 | try: |
526 | | obj = model._default_manager.get(pk=object_id) |
| 526 | obj = self.queryset(request).get(pk=object_id) |
527 | 527 | except model.DoesNotExist: |
528 | 528 | # Don't raise Http404 just yet, because we haven't checked |
529 | 529 | # permissions yet. We don't want an unauthenticated user to be able |
… |
… |
class ModelAdmin(BaseModelAdmin):
|
621 | 621 | app_label = opts.app_label |
622 | 622 | |
623 | 623 | try: |
624 | | obj = self.model._default_manager.get(pk=object_id) |
| 624 | obj = self.queryset(request).get(pk=object_id) |
625 | 625 | except self.model.DoesNotExist: |
626 | 626 | # Don't raise Http404 just yet, because we haven't checked |
627 | 627 | # permissions yet. We don't want an unauthenticated user to be able |