Commit d7768cd4 authored by Vincent Pelletier's avatar Vincent Pelletier

date_dict is never empty. len(date_dict['query']) is a more suitable condition to check.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15871 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 49393a71
...@@ -489,7 +489,7 @@ class SimulationTool(BaseTool): ...@@ -489,7 +489,7 @@ class SimulationTool(BaseTool):
elif at_date : elif at_date :
date_dict['query'].append(at_date) date_dict['query'].append(at_date)
date_dict['range'] = 'ngt' date_dict['range'] = 'ngt'
if len(date_dict) : if len(date_dict['query']):
column_value_dict['date'] = date_dict column_value_dict['date'] = date_dict
else: else:
column_value_dict['date'] = {'query': [to_date], 'range': 'ngt'} column_value_dict['date'] = {'query': [to_date], 'range': 'ngt'}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment