]> SALOME platform Git repositories - tools/eficas.git/commitdiff
Salome HOME
oubli pour les validateurs entre MCFere de l appel a setMCSIMP
authorPASCALE NOYRET <pascale.noyret@edf.fr>
Tue, 30 Aug 2022 16:45:16 +0000 (18:45 +0200)
committerPASCALE NOYRET <pascale.noyret@edf.fr>
Tue, 30 Aug 2022 16:45:16 +0000 (18:45 +0200)
Validation/V_MCSIMP.py

index bf1a8ea4ff9ecbe2a0c347dad17c995dd4c35945..c590bff43f3718da6a434dada002172280022bd7 100644 (file)
@@ -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