[Erp5-report] r43596 nicolas - /erp5/trunk/products/ERP5Type/Constraint/AttributeUnicity.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Feb 23 10:49:51 CET 2011
Author: nicolas
Date: Wed Feb 23 10:49:50 2011
New Revision: 43596
URL: http://svn.erp5.org?rev=43596&view=rev
Log:
Obviously there is no needs to get portal from acquired object
Modified:
erp5/trunk/products/ERP5Type/Constraint/AttributeUnicity.py
Modified: erp5/trunk/products/ERP5Type/Constraint/AttributeUnicity.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Constraint/AttributeUnicity.py?rev=43596&r1=43595&r2=43596&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Constraint/AttributeUnicity.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Constraint/AttributeUnicity.py [utf8] Wed Feb 23 10:49:50 2011
@@ -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)
More information about the Erp5-report
mailing list