Commit 995da365 authored by Nicolas Delaby's avatar Nicolas Delaby

Obviously there is no needs to get portal from acquired object

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43596 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent edc1c740
......@@ -69,7 +69,7 @@ class AttributeUnicity(PropertyExistence):
from Products.ZSQLCatalog.SQLCatalog import Query, NegatedQuery
# Add uid in criterion keys to avoid fetching current object.
criterion_dict['query'] = NegatedQuery(Query(uid=obj.getUid()))
portal = obj.portal_catalog.getPortalObject()
portal = obj.getPortalObject()
result = portal.portal_catalog.countResults(**criterion_dict)[0][0]
if result >= 1:
mapping['value'] = criterion_dict.get(attribute_name)
......
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