Handle Person import
This commit is contained in:
parent
47ba92a8d1
commit
fb3a7c9908
1 changed files with 8 additions and 2 deletions
|
@ -376,8 +376,14 @@ class Command(BaseCommand):
|
|||
continue
|
||||
_object_dict = {self.cols_to_django_fields.get(key): value.lstrip('"').rstrip('"') for key, value in zip(header, row)}
|
||||
_object_dict = handle_object_dict(_object_dict, model_name)
|
||||
m = _model(**_object_dict)
|
||||
m.save()
|
||||
try:
|
||||
m = _model(**_object_dict)
|
||||
m.save()
|
||||
except Exception as ex:
|
||||
print('-----')
|
||||
print(str(ex))
|
||||
print('----------------')
|
||||
continue
|
||||
print("Done importing %s" % str(_model))
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue