mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-11 04:19:25 +00:00
Apply review comments
This commit is contained in:
@ -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