diff --git a/app/management/commands/import.py b/app/management/commands/import.py index 3e65560..2d21008 100644 --- a/app/management/commands/import.py +++ b/app/management/commands/import.py @@ -410,6 +410,9 @@ def handle_object_dict(object_dict, model_name): if 'status' in object_dict: 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']) + object_dict['country'] = Country.objects.get(id=int(object_dict['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',