diff --git a/core/admin.py b/core/admin.py index a3984bde..4db58fc4 100644 --- a/core/admin.py +++ b/core/admin.py @@ -146,11 +146,7 @@ class AttributeValueInline(TabularInline): # type: ignore [type-arg] icon = "fa-solid fa-list-ul" def get_queryset(self, request): - return ( - super() - .get_queryset(request) - .select_related("attribute", "product") - ) + return super().get_queryset(request).select_related("attribute", "product") class ProductImageInline(TabularInline): # type: ignore [type-arg] @@ -174,11 +170,7 @@ class StockInline(TabularInline): # type: ignore [type-arg] icon = "fa-solid fa-boxes-stacked" def get_queryset(self, request): - return ( - super() - .get_queryset(request) - .select_related("vendor", "product") - ) + return super().get_queryset(request).select_related("vendor", "product") class OrderProductInline(TabularInline): # type: ignore [type-arg] diff --git a/core/serializers/detail.py b/core/serializers/detail.py index dd0f605a..e3d141db 100644 --- a/core/serializers/detail.py +++ b/core/serializers/detail.py @@ -46,7 +46,6 @@ class AttributeGroupDetailSerializer(ModelSerializer): class CategoryDetailListSerializer(ListSerializer): - def to_representation(self, data): # type: ignore[override] items = list(data) with suppress(Exception):