-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Numeric properties cannot be nullable #10369
Comments
Workaround:
|
Just for clarification: I'm not sure what In any case, this is the current behavior and unfortunately we can not change it now, it will be a breaking change because everybody who is currently expecting to see a On our todo list for a future version (beyond v9), is to make this package obsolete, but if it helps you feel a little bit better about the bad choices we made in the past, I would encourage you to use and contribute to that! 👍 |
Ahh breaking change yea, that makes sense :-( |
Which Umbraco version are you using?
8.10.1
Bug summary
the following code returns zero if the property is not set:
ipc.Value<decimal?>(alias)
Specifics
No response
Steps to reproduce
Create a property with 'numeric' datatype.
Set it's value to nothing (blank).
Use the API to access the property like so:
var x = ipc.Value<decimal?>(alias)
Expected result / actual result
If the property in the CMS is blank then x should be null. But it is 0
If the property in the CMS is 0 then x should be 0.
The text was updated successfully, but these errors were encountered: