Load boolean data from select_300 field while import
This commit is contained in:
parent
4c328052da
commit
55ec614dd6
1 changed files with 3 additions and 0 deletions
|
@ -452,6 +452,9 @@ def handle_object_dict(object_dict, model_name, debug=False):
|
|||
for i in ['checked']:
|
||||
if i in object_dict:
|
||||
object_dict[i] = True if object_dict[i].lower().strip() == 'true' else False
|
||||
for i in ['select_300']:
|
||||
if i in object_dict:
|
||||
object_dict[i] = True if object_dict[i].lower().strip() == 'x' else False
|
||||
# area field can't be empty
|
||||
if 'area' in object_dict:
|
||||
if object_dict['area'] == '':
|
||||
|
|
Loading…
Add table
Reference in a new issue