Skip to content

Commit

Permalink
Optimize query by a lot
Browse files Browse the repository at this point in the history
  • Loading branch information
ldeluigi committed May 2, 2023
1 parent 585b4ad commit 89d608a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/spellbook/parsers/variants_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def tag_search(q: QuerySet, values: list[QueryValue]) -> QuerySet:
case 'risky' | 'allin':
tag_query &= Q(produces__name='Risky')
case 'winning' | 'gamewinning':
tag_query &= Q(produces__name='Win the game') | Q(produces__name='Win the game at the beginning of your next upkeep')
tag_query &= Q(produces__name__in=['Win the game', 'Win the game at the beginning of your next upkeep'])
case _:
raise NotSupportedError(f'Value {value.value} is not supported for tag search.')
if value.prefix == '-':
Expand Down

0 comments on commit 89d608a

Please sign in to comment.