From 73a8a2199f96f18969a35716dbcac9d155b639fe Mon Sep 17 00:00:00 2001 From: Eric Holscher Date: Thu, 8 Jun 2017 12:18:29 -0700 Subject: [PATCH 1/2] Fix geo filters --- readthedocs/donate/signals.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readthedocs/donate/signals.py b/readthedocs/donate/signals.py index ef1dfa4a170..e361ecc4749 100644 --- a/readthedocs/donate/signals.py +++ b/readthedocs/donate/signals.py @@ -28,7 +28,7 @@ def show_to_geo(promo, country_code): # Remove promo's that exclude this country. - for geo_filter in promo.geo_geo_filters.all(): + for geo_filter in promo.geo_filters.all(): if geo_filter.geo_filter_type == INCLUDE: if country_code in geo_filter.codes: continue From 7ead3ffc93fa0602dd880b4e4d1513e2f3dac1d0 Mon Sep 17 00:00:00 2001 From: Eric Holscher Date: Thu, 8 Jun 2017 12:23:13 -0700 Subject: [PATCH 2/2] Another fix --- readthedocs/donate/signals.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readthedocs/donate/signals.py b/readthedocs/donate/signals.py index e361ecc4749..68632f22695 100644 --- a/readthedocs/donate/signals.py +++ b/readthedocs/donate/signals.py @@ -29,12 +29,12 @@ def show_to_geo(promo, country_code): # Remove promo's that exclude this country. for geo_filter in promo.geo_filters.all(): - if geo_filter.geo_filter_type == INCLUDE: + 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