fixed edge case for ErrorAggregator

This commit is contained in:
Natan Keddem
2023-11-20 21:56:20 -05:00
parent ffbc9b71c0
commit 07ce7e0bae

View File

@@ -71,8 +71,11 @@ class ErrorAggregator:
@property
def no_errors(self) -> bool:
validators = all(validation(element.value) for element in self.elements for validation in element.validation.values())
return self.enable and validators
if len(self.elements) > 0:
validators = all(validation(element.value) for element in self.elements for validation in element.validation.values())
return self.enable and validators
else:
return True
class WColumn(ui.column):