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

[14.0][FIX] base_location_geonames_import : old_zip id may be removed more than once #1115

Merged

Conversation

ivantodorovich
Copy link
Contributor

In that case, using remove would raise a KeyError.
On the other hand, discard fails silently.

I got this issue when re-importing France geonames.
Two rows pointed to the same zip_code:

- - - - - - - - - - - -
FR 62760 Thièvres Hauts-de-France 32 Pas-de-Calais 62 Arrondissement d’Arras 621 50.1306 2.4552 5
FR 62760 Thièvres Hauts-de-France 32 Somme 80 Arrondissement de Péronne 804 50.1268 2.454 5

(Note: there may be other cases like this, this is the first one that raised the exception)

In that case, using remove would raise a KeyError.
On the other hand, discard fails silently.
@pedrobaeza pedrobaeza added this to the 14.0 milestone Jun 9, 2021
@pedrobaeza
Copy link
Member

Fast-tracking the obvious patch:

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 14.0-ocabot-merge-pr-1115-by-pedrobaeza-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit c69e963 into OCA:14.0 Jun 9, 2021
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at b9db4d4. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants