Commit 8c4eb1ed authored by Jérome Perrin's avatar Jérome Perrin

fix missing import (ConflictError) / undecalared variables


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4159 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4bca32fd
...@@ -76,6 +76,7 @@ try: ...@@ -76,6 +76,7 @@ try:
except ImportError: except ImportError:
pass pass
from ZODB.POSException import ConflictError
from zLOG import LOG, INFO, ERROR, WARNING from zLOG import LOG, INFO, ERROR, WARNING
class WorkflowMethod(Method): class WorkflowMethod(Method):
...@@ -991,7 +992,7 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ): ...@@ -991,7 +992,7 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ):
# Accessing object property Ids # Accessing object property Ids
security.declareProtected( Permissions.View, 'getPropertyIdList' ) security.declareProtected( Permissions.View, 'getPropertyIdList' )
def getPropertyIdList(self): def getPropertyIdList(self):
return propertyIds() return self.propertyIds()
#return map(lambda p: p['id'], self.__class__._properties) #return map(lambda p: p['id'], self.__class__._properties)
# Catalog Related # Catalog Related
...@@ -1339,7 +1340,7 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ): ...@@ -1339,7 +1340,7 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ):
# XXX This is a problem - it is used to circumvent a lack of edit # XXX This is a problem - it is used to circumvent a lack of edit
security.declareProtected( Permissions.ModifyPortalContent, 'setCategoryMembership' ) security.declareProtected( Permissions.ModifyPortalContent, 'setCategoryMembership' )
def setCategoryMembership(self, category, node_list, spec=(), base=0): def setCategoryMembership(self, category, node_list, spec=(), portal_type=(), base=0):
self._setCategoryMembership(category, self._setCategoryMembership(category,
node_list, spec=spec, filter=filter, portal_type=portal_type, base=base) node_list, spec=spec, filter=filter, portal_type=portal_type, base=base)
self.reindexObject() self.reindexObject()
...@@ -1403,6 +1404,7 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ): ...@@ -1403,6 +1404,7 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ):
# Advanced behaviour XXX This is new and needs to be checked # Advanced behaviour XXX This is new and needs to be checked
membership_list = self._getAcquiredCategoryMembershipList(category, membership_list = self._getAcquiredCategoryMembershipList(category,
spec = spec, filter=filter, portal_type=portal_type, base=1) spec = spec, filter=filter, portal_type=portal_type, base=1)
result = []
for path in membership_list: for path in membership_list:
value = self._getCategoryTool().resolveCategory(path) value = self._getCategoryTool().resolveCategory(path)
if value is not None: if value is not None:
......
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