Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BooleanBone's defaultValue cannot be a callable #1178

Closed
sveneberth opened this issue May 29, 2024 · 1 comment · Fixed by #1274
Closed

BooleanBone's defaultValue cannot be a callable #1178

sveneberth opened this issue May 29, 2024 · 1 comment · Fixed by #1274
Labels
bug(fix) Something isn't working or address a specific issue or vulnerability Priority: High After critical issues are fixed, these should be dealt with before any further issues.

Comments

@sveneberth
Copy link
Member

The validation allows only bool, if you provide a callable (that returns a boolean) a TypeError is raised

https://github.com/viur-framework/viur-core/blob/33b85bea33d529a3caef58bb8c6edfc2b8a8256c/src/viur/core/bones/boolean.py#L26C80-L26C111

@sveneberth sveneberth added bug(fix) Something isn't working or address a specific issue or vulnerability Priority: High After critical issues are fixed, these should be dealt with before any further issues. labels May 29, 2024
@sveneberth sveneberth changed the title BooleanBone's defaulValaue cannot be a callable BooleanBone's defaultValue cannot be a callable May 29, 2024
@ArneGudermann ArneGudermann linked a pull request Jun 7, 2024 that will close this issue
@sveneberth sveneberth linked a pull request Oct 1, 2024 that will close this issue
phorward added a commit that referenced this issue Oct 9, 2024
Fix for #1178

and add check for  values in getdefaultValue.

---------

Co-authored-by: Jan Max Meyer <[email protected]>
Co-authored-by: Sven Eberth <[email protected]>
@phorward
Copy link
Member

phorward commented Oct 9, 2024

Fixed by #1274

@phorward phorward closed this as completed Oct 9, 2024
@sveneberth sveneberth added this to the ViUR-core v3.7 milestone Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug(fix) Something isn't working or address a specific issue or vulnerability Priority: High After critical issues are fixed, these should be dealt with before any further issues.
Projects
None yet
2 participants