mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-30 22:29:32 +00:00
second patch on eboutic
This commit is contained in:
1 parent
96510b270d
commit
60eff1000f
6 files changed
+106
-81
No files matched your search
@@ -41,7 +41,9 @@ def get_eboutic_products(user: User) -> List[Product]:
|
||||
.products.filter(product_type__isnull=False)
|
||||
.filter(archived=False)
|
||||
.filter(limit_age__lte=user.age)
|
||||
.annotate(priority=F("product_type__priority"))
|
||||
.annotate(category=F("product_type__name"))
|
||||
.annotate(category_comment=F("product_type__comment"))
|
||||
)
|
||||
return [p for p in products if p.can_be_sold_to(user)]
|
||||
|
||||
|
||||
Reference in new issue
Block a user