Commit ee621142 authored by Jérome Perrin's avatar Jérome Perrin

Support compatibility for old checkConsistency resulsts for [-1] and [-2] in __getitem__


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14274 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4fd8034f
...@@ -29,11 +29,12 @@ ...@@ -29,11 +29,12 @@
from Products.PythonScripts.Utility import allow_class from Products.PythonScripts.Utility import allow_class
from Products.ERP5Type.ObjectMessage import ObjectMessage from Products.ERP5Type.ObjectMessage import ObjectMessage
class ConsistencyMessage(ObjectMessage): class ConsistencyMessage(ObjectMessage):
""" """
Consistency Message is used for notifications to user after checkConsistency. Consistency Message is used for notifications to user after checkConsistency.
""" """
def __init__(self, constraint, object_relative_url='', message='', mapping = {}, **kw): def __init__(self, constraint, object_relative_url='',
message='', mapping = {}, **kw):
""" """
init specific variable to constraint init specific variable to constraint
""" """
...@@ -55,7 +56,7 @@ class ConsistencyMessage(ObjectMessage): ...@@ -55,7 +56,7 @@ class ConsistencyMessage(ObjectMessage):
return '%s inconsistency' % self.class_name return '%s inconsistency' % self.class_name
elif key == 2: elif key == 2:
return 104 return 104
elif key == 4: elif key in (4, -1):
return self.description return self.description
else: else:
return self.getTranslatedMessage() return self.getTranslatedMessage()
......
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