Hack to handle empty country_lookup
This commit is contained in:
parent
8cef9e4bef
commit
ab551cfb6c
1 changed files with 2 additions and 0 deletions
|
@ -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',
|
||||
|
|
Loading…
Reference in a new issue