diff --git a/app/management/commands/import.py b/app/management/commands/import.py index 2d21008..07fe724 100644 --- a/app/management/commands/import.py +++ b/app/management/commands/import.py @@ -411,8 +411,9 @@ def handle_object_dict(object_dict, model_name): print('Getting status of %s' % object_dict['status']) 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']) + 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', 'molluscs', 'crustaceans', 'arachnids', 'angiosperms', 'gymnosperms', 'fungi', 'algae', 'microbes', 'biological_field_sampling', 'data_mining', 'remote_sensing',