Only add shuffle if there is more than 1 answer *and* any of the answers have geo

This commit is contained in:
Stephen Coursen
2018-01-05 22:34:15 +00:00
parent 6c91a92a72
commit e6cda62284
+4 -4
View File
@@ -221,11 +221,11 @@ class Ns1Provider(BaseProvider):
},
)
params['filters'] = []
if len(params['answers']) > 1:
params['filters'].append(
{"filter": "shuffle", "config":{}}
)
if has_country:
if len(params['answers']) > 1:
params['filters'].append(
{"filter": "shuffle", "config":{}}
)
params['filters'].append(
{"filter": "geotarget_country", "config": {}}
)