1
0
Fork 1
mirror of https://github.com/thatmattlove/hyperglass.git synced 2026-01-17 00:38:06 +00:00

fix issue where pattern rules failed validation

This commit is contained in:
thatmattlove 2024-06-16 17:12:54 -04:00
parent 6d06b9809d
commit 08fd310b44

View file

@ -216,7 +216,7 @@ class RuleWithPattern(Rule):
return InputValidationError(target=value, error="Denied")
return False
if isinstance(target, t.List) and multiple:
if isinstance(target, t.List):
for result in (validate_single_value(v) for v in target):
if isinstance(result, BaseException):
self._passed = False
@ -227,9 +227,6 @@ class RuleWithPattern(Rule):
self._passed = True
return True
if isinstance(target, t.List) and not multiple:
raise InputValidationError(error="Target must be a single value", target=target)
result = validate_single_value(target)
if isinstance(result, BaseException):