Commit b5392479 authored by Rafael Monnerat's avatar Rafael Monnerat Committed by Xiaowu Zhang

Only get selection_name if it exist

  Idea: This should be improved to reuse proxyfied field method
        instead directly.
parent e99d7069
......@@ -762,12 +762,13 @@ class ProxyField(ZMIField):
return proxy_field.get_value(id, **kw)
def _cacheable_key(self):
selection_name = self.get_value('selection_name')
if selection_name is not None:
selection_tool = self.getPortalObject().portal_selections
selection = selection_tool.getSelectionFor(selection_name, REQUEST = self.REQUEST)
if selection is not None:
return ("list_start", selection.getParams().get("list_start"))
if self.has_value('selection_name'):
selection_name = self.get_value('selection_name')
if selection_name is not None:
selection_tool = self.getPortalObject().portal_selections
selection = selection_tool.getSelectionFor(selection_name, REQUEST = self.REQUEST)
if selection is not None:
return ("list_start", selection.getParams().get("list_start"))
return "default"
def _getCacheId(self):
......
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