support empty param
This commit is contained in:
parent
3040a11de9
commit
43e30bba47
|
@ -1037,6 +1037,9 @@ class ConstraintAnnotator:
|
|||
raise DictConsistencyError(_(f"All '{param.type}' variables must have a value in order to calculate {fill.target}"))
|
||||
if param.type == 'suffix' and hasattr(param, 'text'):
|
||||
raise DictConsistencyError(_(f"All '{param.type}' variables must not have a value in order to calculate {fill.target}"))
|
||||
if param.type == 'string':
|
||||
if not hasattr(param, 'text'):
|
||||
param.text = None
|
||||
if param.type == 'variable':
|
||||
try:
|
||||
param.text, suffix = self.objectspace.paths.get_variable_path(param.text,
|
||||
|
|
|
@ -12,7 +12,9 @@
|
|||
|
||||
<constraints>
|
||||
<check name="valid_enum" target="mode_conteneur_actif">
|
||||
<param>['a','b','c']</param>
|
||||
<param>a</param>
|
||||
<param>b</param>
|
||||
<param>c</param>
|
||||
</check>
|
||||
</constraints>
|
||||
|
||||
|
|
|
@ -17,7 +17,9 @@
|
|||
|
||||
<constraints>
|
||||
<check name="valid_enum" target="enumvar">
|
||||
<param>['a', 'b', 'c']</param>
|
||||
<param>a</param>
|
||||
<param>b</param>
|
||||
<param>c</param>
|
||||
</check>
|
||||
</constraints>
|
||||
|
||||
|
|
|
@ -19,7 +19,9 @@
|
|||
|
||||
<constraints>
|
||||
<check name="valid_enum" target="enumvar">
|
||||
<param>[1, 2, 3]</param>
|
||||
<param>1</param>
|
||||
<param>2</param>
|
||||
<param>3</param>
|
||||
</check>
|
||||
</constraints>
|
||||
|
||||
|
|
Loading…
Reference in New Issue