Commit 8d69eaaa authored by Yoshinori Okuji's avatar Yoshinori Okuji

Use an empty string instead of None for a none value,

because Formulator prefers that.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@487 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 54dedaaa
...@@ -119,13 +119,14 @@ class Renderer(Filter): ...@@ -119,13 +119,14 @@ class Renderer(Filter):
new_value_list.append(obj) new_value_list.append(obj)
return new_value_list return new_value_list
def render(self, category_tool, value_list): def render(self, value_list):
""" """
Returns rendered items Returns rendered items
""" """
#LOG('render', 0, repr(self.filter)) #LOG('render', 0, repr(self.filter))
#LOG('render', 10, repr(value_list)) #LOG('render', 10, repr(value_list))
value_list = self.getObjectList(value_list) value_list = self.getObjectList(value_list)
LOG('render', 5, repr(value_list))
value_list = self.filter(value_list) value_list = self.filter(value_list)
LOG('render', 10, repr(value_list)) LOG('render', 10, repr(value_list))
if self.sort_method is not None: if self.sort_method is not None:
...@@ -151,6 +152,7 @@ class Renderer(Filter): ...@@ -151,6 +152,7 @@ class Renderer(Filter):
if v > max_count: if v > max_count:
guessed_base_category = k guessed_base_category = k
max_count = v max_count = v
LOG('render', 100, repr(guessed_base_category))
# Initialize the list of items. # Initialize the list of items.
item_list = [] item_list = []
...@@ -162,9 +164,11 @@ class Renderer(Filter): ...@@ -162,9 +164,11 @@ class Renderer(Filter):
item_list.append(item) item_list.append(item)
if self.display_none_category: if self.display_none_category:
if self.is_right_display: if self.is_right_display:
item = [None, ''] #item = [None, '']
item = ['', ''] # XXX Formulator prefer '' to None.
else: else:
item = ['', None] #item = ['', None]
item = ['', ''] # XXX Formulator prefer '' to None.
item_list.append(item) item_list.append(item)
for value in value_list: for value in value_list:
......
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