fix card_multiselect filtering and quantity controls

This commit is contained in:
badblocks 2025-03-13 15:48:26 -07:00
parent 6e4c6040bd
commit b97ddde71c
52 changed files with 1689 additions and 2268 deletions

View file

@ -54,17 +54,6 @@ class HomePageView(TemplateView):
"acceptances"
)
.select_related("initiated_by__user")
.annotate(
is_active=Case(
When(
Q(total_have_accepted__lt=F('total_have_quantity')) &
Q(total_want_accepted__lt=F('total_want_quantity')),
then=Value(True)
),
default=Value(False),
output_field=BooleanField()
)
)
)
return qs
@ -77,7 +66,7 @@ class HomePageView(TemplateView):
.prefetch_related("decks")
# Reuse base trade offer queryset for market stats
base_offer_qs = self.get_base_trade_offer_queryset().filter(manually_closed=False, is_active=True)
base_offer_qs = self.get_base_trade_offer_queryset().filter(is_closed=False)
# Recent Offers
recent_offers_qs = base_offer_qs.order_by("-created_at")[:10]