Strip quotes in Mother range

This commit is contained in:
PCoder 2021-11-25 11:11:56 +05:30
parent dd62f6a38c
commit 0bf66de72f
1 changed files with 1 additions and 1 deletions

View File

@ -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']))
object_dict['mother_range'] = Range.objects.get(id=int(object_dict['mother_range'].strip('\'')))
except Range.DoesNotExist as dne:
print(str(dne))
if model_name == 'Keyword':