From 85664e501b02c2258a3562cfe1ff7f6ef016837c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20G=C3=B3rny?= <bartek@gorny.edu.pl> Date: Mon, 29 Jan 2007 14:56:50 +0000 Subject: [PATCH] removed 'throw' argument git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12435 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../Constraint/DocumentReferenceConstraint.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/product/ERP5/Constraint/DocumentReferenceConstraint.py b/product/ERP5/Constraint/DocumentReferenceConstraint.py index 69835e34fc..90a802eca7 100644 --- a/product/ERP5/Constraint/DocumentReferenceConstraint.py +++ b/product/ERP5/Constraint/DocumentReferenceConstraint.py @@ -41,7 +41,7 @@ class DocumentReferenceConstraint(Constraint): (although we could, e.g. by changing version number) """ - def checkConsistency(self, object, fixit=0, throw=False): # XXX-JPS throw is not part of API - Please remove + def checkConsistency(self, object, fixit=0): # XXX-JPS throw is not part of API - Please remove """ Implement here the consistency checker """ @@ -53,8 +53,6 @@ class DocumentReferenceConstraint(Constraint): message = '%s is not defined' % req # XXX-JPS Is translation required here with a Message class ? error_list.append(self._generateError(object, N_(message))) if error_list: - if throw: # XXX-JPS throw is not part of API - Please remove - raise Exception(str(error_list)) return error_list res = object.portal_catalog(reference=object.getReference(), language=object.getLanguage(), version=object.getVersion(), portal_type=object.getPortalDocumentTypeList()) @@ -67,10 +65,7 @@ class DocumentReferenceConstraint(Constraint): raise Exception('Fatal error: multiple objects %s - %s - %s exist' % (object.getReference(), object.getLanguage(), object.getVersion())) #error_list.append(self._generateError(object, N_(s))) - if hasattr(object, 'Document_additionalConsistencyCheck'): - message = object.Document_additionalConsistencyCheck() - if message not in (None, ''): - error_list.append(self._generateError(object, N_(message))) - if error_list and throw: # XXX-JPS throw is not part of API - Please remove - raise Exception(str(error_list)) - return error_list + if error_list: + return error_list + +# vim: filetype=python syntax=python shiftwidth=2 -- 2.30.9