Skip to content
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

Properly set filter rules for geo answers #195

Merged
merged 4 commits into from Feb 15, 2018
Merged

Conversation

scoursen
Copy link
Contributor

Only set filter rules when geo target information is configured. If the answer has no geo target, don't set the rules.

@vanbroup
Copy link
Contributor

@ross, verified and confirmed working ok

if has_country:
if len(params['answers']) > 1:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this change probably needs a corresponding tweak in the tests as this if always evaluates to true.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, that if check is unnecessary (since as you pointed out it's always true)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would removing it still apply a "shuffle" filter to records with a single answer? Not sure that'd be a problem, but I assume that was the original intent behind the if > 1

@scoursen
Copy link
Contributor Author

scoursen commented Feb 15, 2018 via email

@scoursen
Copy link
Contributor Author

scoursen commented Feb 15, 2018 via email

@ross
Copy link
Contributor

ross commented Feb 15, 2018

The original intent was to handle shuffle when there was multiple answers
(regardless of geotarget). That seems to have been a misunderstanding of
our internal api

OK.

@ross ross merged commit fa047e0 into octodns:master Feb 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants