Set MountainRange area to -1 explicitly if not set
This commit is contained in:
parent
ec40e896b3
commit
0d3bbb3154
1 changed files with 4 additions and 0 deletions
|
@ -449,6 +449,10 @@ 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
|
||||
# area field can't be empty
|
||||
if 'area' in object_dict:
|
||||
if object_dict['area'] == '':
|
||||
object_dict['area'] = -1
|
||||
if model_name == 'Keyword':
|
||||
object_dict['keyword'] = object_dict['keyword_id']
|
||||
object_dict.pop('keyword_id')
|
||||
|
|
Loading…
Reference in a new issue