Skip to content

Commit

Permalink
Fix small bug
Browse files Browse the repository at this point in the history
  • Loading branch information
alexis-via committed Sep 15, 2023
1 parent 4ff88c0 commit 0836797
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion partner_import_helper/models/res_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,9 @@ def _import_prepare_vals(self, vals, speedy, email_check_deliverability=True, cr
country_id = country_code = False
if vals.get('country_name') and isinstance(vals['country_name'], str) and not vals.get('country_id'):
country_id = self._match_country(vals, speedy)
# Warning: country_id can be False
vals['country_id'] = country_id
country_code = speedy['country']['id2code'][country_id]
country_code = speedy['country']['id2code'].get(country_id)
# TITLE
if not vals.get('is_company') and vals.get('title_code') and isinstance(vals['title_code'], str) and not vals.get('title'):
title_id = self._match_title(vals, speedy)
Expand Down

0 comments on commit 0836797

Please sign in to comment.