Skip to content

Commit 76c933e

Browse files
committed
altered allowed values validator so it can accept lazy fields
1 parent 67f7e72 commit 76c933e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pydra/engine/helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ def _check_special_type(tp, name):
482482
def _allowed_values_validator(instance, attribute, value):
483483
"""checking if the values is in allowed_values"""
484484
allowed = attribute.metadata["allowed_values"]
485-
if value is attr.NOTHING:
485+
if value is attr.NOTHING or isinstance(value, LazyField):
486486
pass
487487
elif value not in allowed:
488488
raise ValueError(

0 commit comments

Comments
 (0)