Insert a default mother range initially, which will be reimported in the second pass
This commit is contained in:
parent
03f06957f8
commit
4e9980d5f5
1 changed files with 1 additions and 1 deletions
|
@ -402,7 +402,7 @@ def handle_object_dict(object_dict, model_name):
|
|||
if object_dict['mother_range'] == '':
|
||||
object_dict['mother_range'] = 0
|
||||
try:
|
||||
object_dict['mother_range'] = Range.objects.get(id=int(object_dict['mother_range'].strip('\'')))
|
||||
object_dict['mother_range'] = Range.objects.get(id=0) # default Range which exists already
|
||||
except Range.DoesNotExist as dne:
|
||||
print(str(dne))
|
||||
if model_name == 'Keyword':
|
||||
|
|
Loading…
Reference in a new issue