Price model

This commit is contained in:
imperosol committed 2026-04-29 12:53:20 +02:00
1 parent f9c5297473
commit 1c6d7f435a
5 files changed
+201 -12

No files matched your search

+2 -6
View File
@@ -101,13 +101,9 @@ class ProductController(ControllerBase):
"""Get the detailed information about the products."""
return filters.filter(
Product.objects.select_related("club")
.prefetch_related("buying_groups")
.prefetch_related("prices", "prices__groups")
.select_related("product_type")
.order_by(
F("product_type__order").asc(nulls_last=True),
"product_type",
"name",
)
.order_by(F("product_type__order").asc(nulls_last=True), "name")
)