Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Sven Eberth <mail@sveneberth.de>
  • Loading branch information
ArneGudermann and sveneberth authored Oct 2, 2024
1 parent 16dcdf3 commit a030e74
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/viur/core/bones/boolean.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ def __init__(
):
if defaultValue is not None:
# We have given an explicit defaultValue and maybe a complex structure
if not kwargs.get("languages") and not (isinstance(defaultValue, bool) and not callable(defaultValue)):
raise TypeError("Only 'True', 'False', 'None' or 'callable' "
"can be provided as BooleanBone defaultValue")
if not kwargs.get("languages") and not (isinstance(defaultValue, bool) or callable(defaultValue)):

# TODO: missing validation for complex types, but in other bones too

super().__init__(defaultValue=defaultValue, **kwargs)
Expand Down

0 comments on commit a030e74

Please sign in to comment.