From ed3be2ed9c24a3acc17edc00f101f020c901e048 Mon Sep 17 00:00:00 2001 From: PASCALE NOYRET Date: Tue, 30 Aug 2022 18:45:16 +0200 Subject: [PATCH] oubli pour les validateurs entre MCFere de l appel a setMCSIMP --- Validation/V_MCSIMP.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Validation/V_MCSIMP.py b/Validation/V_MCSIMP.py index bf1a8ea4..c590bff4 100644 --- a/Validation/V_MCSIMP.py +++ b/Validation/V_MCSIMP.py @@ -102,6 +102,7 @@ class MCSIMP(object): if self.state == 'unchanged': return self.valid else: + if self.definition.homo=='information' : return 1 valid = 1 v = self.valeur # verification presence @@ -157,10 +158,15 @@ class MCSIMP(object): # if valid and self.definition.validators: try: + if hasattr(self.definition.validators, 'set_MCSimp'): + self.definition.validators.set_MCSimp(self) self.definition.validators.convert(lval) except ValError as e: self.cr.fatal("invalid keyword {}:{}\nCriteria : {}".format(tr(self.nom), str(e), self.definition.validators.info())) valid = 0 + except Exception as e: + self.cr.fatal("invalid keyword {}:{}\nCritere Catalogue : {}".format(tr(self.nom), str(e), self.definition.validators.info())) + valid = 0 else: # si pas de cr demande, on sort a la toute premiere erreur try: @@ -169,11 +175,14 @@ class MCSIMP(object): intoProto.adapt(val) cardProto.adapt(lval) if self.definition.validators: + # Attention, ne fonctionne pas avec OrVal ou AndVal if hasattr(self.definition.validators, 'set_MCSimp'): self.definition.validators.set_MCSimp(self) self.definition.validators.convert(lval) except ValError as e: valid = 0 + except Exception as e: + valid = 0 self.setValid(valid) return self.valid -- 2.39.2