Fix card_multiselect and trade create view using old db fields

This commit is contained in:
badblocks 2025-03-17 15:38:20 -07:00
parent c77e32a82d
commit fb9f2f5848
4 changed files with 13 additions and 14 deletions

View file

@ -42,9 +42,7 @@ class TradeOfferCreateView(LoginRequiredMixin, CreateView):
context = super().get_context_data(**kwargs)
from cards.models import Card
# Ensure available_cards is a proper QuerySet
context["cards"] = Card.objects.all().order_by("name", "rarity_level") \
.select_related("rarity", "cardset") \
.prefetch_related("decks")
context["cards"] = Card.objects.all().order_by("name", "rarity_level")
friend_codes = self.request.user.friend_codes.all()
if "initiated_by" in self.request.GET:
try: