Commit de58b395 authored by Nicolas Delaby's avatar Nicolas Delaby

Avoid useless dictionary computation in render_dict

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41173 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c7f1320b
......@@ -1331,6 +1331,8 @@ class DateTimeWidget(Widget):
format of provided value.
query : Passthrough of given value.
"""
if not value:
return None
format_dict = self.format_to_sql_format_dict
input_order = format_dict.get(self.getInputOrder(field),
self.sql_format_default)
......@@ -1807,6 +1809,8 @@ class FloatWidget(TextWidget):
format of provided value.
query : Passthrough of given value.
"""
if not value:
return None
precision = field.get_value('precision')
format = '0'
if precision:
......
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