Commit aca61a1d authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

matrix: Update Consistency Check to return Message

parent 7f8fb3ee
...@@ -30,7 +30,9 @@ from Products.ERP5Type.Globals import InitializeClass, PersistentMapping ...@@ -30,7 +30,9 @@ from Products.ERP5Type.Globals import InitializeClass, PersistentMapping
from Acquisition import aq_base from Acquisition import aq_base
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
from Products.ERP5Type.ConsistencyMessage import ConsistencyMessage
from Products.ERP5Type.Utils import cartesianProduct from Products.ERP5Type.Utils import cartesianProduct
from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter
from zLOG import LOG from zLOG import LOG
...@@ -481,12 +483,13 @@ class Matrix(object): ...@@ -481,12 +483,13 @@ class Matrix(object):
to_delete_set = set() to_delete_set = set()
error_list = [] error_list = []
def addError(error_message): def addError(error_message):
error_message = "XMLMatrix inconsistency: " + error_message
if fixit: if fixit:
error_message += ' (fixed)' error_message += ' (fixed)'
error = (self.getRelativeUrl(), error = ConsistencyMessage(self,
'XMLMatrix inconsistency', object_relative_url=self.getRelativeUrl(),
102, message=error_message,
error_message) mapping={})
error_list.append(error) error_list.append(error)
......
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