mozilla/zamboni — pull request #1625 by diox (2014-01-13 17:48:00+00:00)
Title: Fix upsell in AppSerializer and es_app_to_dict (bug 956820)

https://bugzilla.mozilla.org/show_bug.cgi?id=956820

- Don't return upsell if in an excluded region
- Don't return upsell if it's not a public app
- Add tests

cc @andym for the `get_excluded_region_ids()` change. Questions I asked on IRC:
- In https://github.com/mozilla/zamboni/commit/df6eddf9#diff-692d706d337b4dc29d4f2b4202e1766bR594 where `get_excluded_region_ids()` was added, a check was added making sure there is a tier before excluding regions ; Was there a reason ? Wouldn't we want to consider all regions are excluded if there is no tier for this app ?
- How does payments disabling in a region works ? In particular, does this affect the result of `get_excluded_region_ids()` ? If it does, doesn’t that mean that an app indexed while payments are disabled in a region will exclude it from that region till the next time it's re-indexed, even if payments are re-enabled in that region in the meantime ?