diff --git a/app/management/commands/import.py b/app/management/commands/import.py index 07fe724..9327f1b 100644 --- a/app/management/commands/import.py +++ b/app/management/commands/import.py @@ -412,6 +412,8 @@ def handle_object_dict(object_dict, model_name): object_dict['status'] = PeopleStatus.objects.get(id=int(object_dict['status'])) if 'country_lookup' in object_dict: print('Getting country of %s' % object_dict['country_lookup']) + if object_dict['country_lookup'] == '': + object_dict['country_lookup'] = 0 object_dict['country'] = Country.objects.get(id=int(object_dict['country_lookup'])) object_dict.pop('country_lookup') for i in ['news_letter', 'birds', 'mammals', 'reptiles', 'amphibians', 'fish', 'insects',