From: PASCALE NOYRET Date: Tue, 30 Aug 2022 16:45:16 +0000 (+0200) Subject: oubli pour les validateurs entre MCFere de l appel a setMCSIMP X-Git-Tag: merge_uncertainty_odysee_1210~26 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ed3be2ed9c24a3acc17edc00f101f020c901e048;p=tools%2Feficas.git oubli pour les validateurs entre MCFere de l appel a setMCSIMP --- 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