Add checked field
This commit is contained in:
parent
345c276a62
commit
adfdbc0a86
1 changed files with 3 additions and 0 deletions
|
@ -405,6 +405,9 @@ def handle_object_dict(object_dict, model_name):
|
|||
object_dict['mother_range'] = Range.objects.get(id=0) # default Range which exists already
|
||||
except Range.DoesNotExist as dne:
|
||||
print(str(dne))
|
||||
for i in ['checked']:
|
||||
if i in object_dict:
|
||||
object_dict[i] = True if object_dict[i].lower().strip() == 'true' else False
|
||||
if model_name == 'Keyword':
|
||||
object_dict['keyword'] = object_dict['keyword_id']
|
||||
object_dict.pop('keyword_id')
|
||||
|
|
Loading…
Reference in a new issue