From ee6211427d514f285603b1e9473c6599c46d128d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Fri, 27 Apr 2007 12:24:37 +0000 Subject: [PATCH] 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 --- product/ERP5Type/ConsistencyMessage.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/product/ERP5Type/ConsistencyMessage.py b/product/ERP5Type/ConsistencyMessage.py index a34a24b991..945bd12ca7 100644 --- a/product/ERP5Type/ConsistencyMessage.py +++ b/product/ERP5Type/ConsistencyMessage.py @@ -29,11 +29,12 @@ from Products.PythonScripts.Utility import allow_class from Products.ERP5Type.ObjectMessage import ObjectMessage -class ConsistencyMessage(ObjectMessage): +class ConsistencyMessage(ObjectMessage): """ 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 """ @@ -55,7 +56,7 @@ class ConsistencyMessage(ObjectMessage): return '%s inconsistency' % self.class_name elif key == 2: return 104 - elif key == 4: + elif key in (4, -1): return self.description else: return self.getTranslatedMessage() -- 2.30.9