Skip to content

Fix geo filters #2931

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 15, 2017
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions readthedocs/donate/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@

def show_to_geo(promo, country_code):
# Remove promo's that exclude this country.
for geo_filter in promo.geo_geo_filters.all():
if geo_filter.geo_filter_type == INCLUDE:
for geo_filter in promo.geo_filters.all():
if geo_filter.filter_type == INCLUDE:
if country_code in geo_filter.codes:
continue
else:
return False
if geo_filter.geo_filter_type == EXCLUDE:
if geo_filter.filter_type == EXCLUDE:
if country_code in geo_filter.codes:
return False

Expand Down