diff options
| author | Nicolas Lempereur <nle@odoo.com> | 2016-12-30 15:22:13 +0100 |
|---|---|---|
| committer | Nicolas Lempereur <nle@odoo.com> | 2016-12-30 15:27:48 +0100 |
| commit | 5869cd6bd043e9eee5bbddc4c2c82c9576c35535 (patch) | |
| tree | ac728e275cf1e7376c7d129c9cda1ae86851b3cc /addons | |
| parent | e1deead1cbb3b447944aa0108194b81f61e07098 (diff) | |
[FIX] website_customer: error if customer without countries
For customer without countries, we get False instead of tuple:
(country_id, 'country name')
Introduced by a35cce2008.
opw-703234
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/website_customer/controllers/main.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/website_customer/controllers/main.py b/addons/website_customer/controllers/main.py index 03202d63a5f..c05fb904f55 100644 --- a/addons/website_customer/controllers/main.py +++ b/addons/website_customer/controllers/main.py @@ -51,7 +51,7 @@ class WebsiteCustomer(http.Controller): if country_id: domain += [('country_id', '=', country_id)] curr_country = Country.browse(country_id) - if country_id not in map(lambda x: x['country_id'][0], countries): + if country_id not in (x['country_id'][0] for x in countries if x['country_id']): if curr_country.exists(): countries.append({ 'country_id_count': 0, |
