Commit 458be149 authored by Yoshinori Okuji's avatar Yoshinori Okuji

If __hash__ is not defined, do not check acquired_object_dict.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@668 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 39b71840
...@@ -805,8 +805,13 @@ class CategoryTool( UniqueObject, Folder, Base ): ...@@ -805,8 +805,13 @@ class CategoryTool( UniqueObject, Folder, Base ):
result = list(result) # make a copy result = list(result) # make a copy
for my_acquisition_object in my_acquisition_object_list: for my_acquisition_object in my_acquisition_object_list:
#LOG('getSingleCategoryAcquiredMembershipList', 0, 'my_acquisition_object = %s, acquired_object_dict = %s' % (str(my_acquisition_object), str(acquired_object_dict))) #LOG('getSingleCategoryAcquiredMembershipList', 0, 'my_acquisition_object = %s, acquired_object_dict = %s' % (str(my_acquisition_object), str(acquired_object_dict)))
#LOG('getSingleCategoryAcquiredMembershipList', 0, 'my_acquisition_object.__dict__ = %s' % str(my_acquisition_object.__dict__))
#LOG('getSingleCategoryAcquiredMembershipList', 0, 'my_acquisition_object.__hash__ = %s' % str(my_acquisition_object.__hash__()))
#if my_acquisition_object is not None: #if my_acquisition_object is not None:
if my_acquisition_object is not None and my_acquisition_object not in acquired_object_dict: if my_acquisition_object is not None:
if hasattr(my_acquisition_object, '__hash__'):
if my_acquisition_object in acquired_object_dict:
continue
acquired_object_dict[my_acquisition_object] = 1 acquired_object_dict[my_acquisition_object] = 1
if hasattr(my_acquisition_object, '_categories'): if hasattr(my_acquisition_object, '_categories'):
# We should only consider objects which define that category # We should only consider objects which define that category
......
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