From 1d4bbf6a6d3486239f2074ebd30eb76ac30c49a6 Mon Sep 17 00:00:00 2001 From: Andrey Smakotin Date: Sun, 18 Jan 2026 19:23:00 +0300 Subject: [PATCH] =?UTF-8?q?fix(admin):=20=D0=B8=D1=81=D0=BF=D1=80=D0=B0?= =?UTF-8?q?=D0=B2=D0=B8=D1=82=D1=8C=20get=5Fqueryset=20=D0=B2=20ProductAdm?= =?UTF-8?q?in?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Заменить Product.all_objects.all() на super().get_queryset(request), так как у модели Product нет менеджера all_objects (нет soft delete). Co-Authored-By: Claude Opus 4.5 --- myproject/products/admin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/myproject/products/admin.py b/myproject/products/admin.py index 6f70c2e..c7cc0f4 100644 --- a/myproject/products/admin.py +++ b/myproject/products/admin.py @@ -500,8 +500,8 @@ class ProductAdmin(TenantAdminOnlyMixin, admin.ModelAdmin): cost_price_details_display.short_description = 'Себестоимость товара' def get_queryset(self, request): - """Переопределяем queryset для доступа ко всем товарам (включая удаленные)""" - qs = Product.all_objects.all() + """Переопределяем queryset для доступа ко всем товарам""" + qs = super().get_queryset(request) ordering = self.get_ordering(request) if ordering: qs = qs.order_by(*ordering)