Commit 32bcd709 authored by Sebastien Robin's avatar Sebastien Robin

make getPrediatePropertyDict working with asPredicate


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3102 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6531bb64
...@@ -424,7 +424,10 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject): ...@@ -424,7 +424,10 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject):
Construct a dictionnary with a list of properties Construct a dictionnary with a list of properties
to catalog into the table predicate to catalog into the table predicate
""" """
if getattr(object,'isPredicate',None) is None: if not getattr(object,'isPredicate',None):
return None
object = object.asPredicate()
if object is None:
return None return None
property_dict = {} property_dict = {}
identity_criterion = getattr(object,'_identity_criterion',None) identity_criterion = getattr(object,'_identity_criterion',None)
...@@ -439,6 +442,7 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject): ...@@ -439,6 +442,7 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject):
property_dict['%s_min' % property] = min property_dict['%s_min' % property] = min
if max is not None: if max is not None:
property_dict['%s_max' % property] = max property_dict['%s_max' % property] = max
property_dict['membership_criterion_category_list'] = object.getMembershipCriterionCategoryList()
return property_dict return property_dict
......
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