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

District import is failing when using MySQL #204

Open
calinrada opened this issue Sep 19, 2018 · 0 comments
Open

District import is failing when using MySQL #204

calinrada opened this issue Sep 19, 2018 · 0 comments

Comments

@calinrada
Copy link

calinrada commented Sep 19, 2018

Environment:

Python 3.6.4
Django 2.0.7
django-cities 0.5.0.6
Ubuntu 16.04
MySQL 5.7

Command:

$ manage.py cities import

or

$ manage.py cities --import=district

Importing districts will fail with a ValueError exception that it's not handled.

except City.DoesNotExist as e:

I have solved this by modifying L635 as follows:

 except (City.DoesNotExist, ValueError) as e:
sowinski added a commit to sowinski/django-cities that referenced this issue Oct 30, 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

No branches or pull requests

1 participant