mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-30 22:29:32 +00:00
Apply review comments
This commit is contained in:
1 parent
7c9a966e54
commit
5dc9e24cd0
5 files changed
+69
-50
No files matched your search
+1
-1
@@ -48,7 +48,7 @@ def get_eboutic_products(user: User) -> list[Product]:
|
||||
.annotate(order=F("product_type__order"))
|
||||
.annotate(category=F("product_type__name"))
|
||||
.annotate(category_comment=F("product_type__comment"))
|
||||
.annotate(price=F("selling_price"))
|
||||
.annotate(price=F("selling_price")) # <-- selected price for basket validation
|
||||
.prefetch_related("buying_groups") # <-- used in `Product.can_be_sold_to`
|
||||
)
|
||||
return [p for p in products if p.can_be_sold_to(user)]
|
||||
|
||||
Reference in new issue
Block a user