diff --git a/app/management/commands/import.py b/app/management/commands/import.py index ed6305c..a70ad2e 100644 --- a/app/management/commands/import.py +++ b/app/management/commands/import.py @@ -490,10 +490,10 @@ def handle_object_dict(object_dict, model_name, debug=False): object_dict['status'] = 0 object_dict['status'] = PeopleStatus.objects.get(id=int(object_dict['status'])) if 'country_lookup' in object_dict: - if debug: - print('Getting country of %s' % object_dict['country_lookup']) if object_dict['country_lookup'].strip() == '' or object_dict['country_lookup'] is None: object_dict['country_lookup'] = 0 + if debug: + print('Getting country of %s' % object_dict['country_lookup']) 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',