Update trade_offer_tags to use new have/want card qty fields

This commit is contained in:
badblocks 2025-03-13 21:04:32 -07:00
parent b20ca8a888
commit 4792906907

View file

@ -15,11 +15,11 @@ def render_trade_offer(context, offer):
want_cards_available = []
for card in offer.trade_offer_have_cards.all():
if all(acc.requested_card_id != card.card_id for acc in acceptances):
if (card.quantity > card.qty_accepted):
have_cards_available.append(card)
for card in offer.trade_offer_want_cards.all():
if all(acc.offered_card_id != card.card_id for acc in acceptances):
if (card.quantity > card.qty_accepted):
want_cards_available.append(card)
return {