We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 510c484 commit bacab51Copy full SHA for bacab51
promo_code/user/views.py
@@ -152,10 +152,9 @@ def get_queryset(self):
152
target__country__iexact=user_country,
153
)
154
155
- q_country_target_not_set_or_empty = (
156
- ~django.db.models.Q(target__has_key='country')
157
- | django.db.models.Q(target__country__isnull=True)
158
- )
+ q_country_target_not_set_or_empty = ~django.db.models.Q(
+ target__has_key='country',
+ ) | django.db.models.Q(target__country__isnull=True)
159
q_user_meets_country_target = (
160
q_country_target_matches | q_country_target_not_set_or_empty
161
0 commit comments