Skip to content

Commit

Permalink
Remove variant prefetch to avoid "too many sql variables" errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ldeluigi committed Nov 29, 2022
1 parent 16c95e6 commit f7268a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/spellbook/variants/variant_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def __init__(self):
self.combos = Combo.objects.prefetch_related('uses', 'requires', 'needs', 'removes', 'produces')
self.features = Feature.objects.prefetch_related('cards', 'produced_by_combos', 'needed_by_combos', 'removed_by_combos')
self.cards = Card.objects.prefetch_related('features', 'used_in_combos')
self.variants = Variant.objects.prefetch_related('uses', 'requires')
self.variants = Variant.objects.all()
self.utility_features_ids = frozenset[int](Feature.objects.filter(utility=True).values_list('id', flat=True))
self.templates = Template.objects.prefetch_related('required_by_combos')
self.not_working_variants = fetch_not_working_variants(self.variants)
Expand Down

0 comments on commit f7268a8

Please sign in to comment.