Umbraco.Decimal property editor return 0 when the number does not have decimals #17655
Labels
affected/v13
affected/v14
affected/v15
area/backend
state/reproduced
state/sprint-candidate
We're trying to get this in a sprint at HQ in the next few weeks
type/bug
Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)
14.3.1
Bug summary
Umbraco.Decimal property editor return 0 when the number does not have decimals.
If I write e.g. 9.6 the .Value() will return the decimal 9.6
If I write e.g. 9 the .Value() will return the decimal 0
Specifics
I have pinpointed the issue to the static method DecimalValueConverter.ParseDecimalValue(object? source)
The problem is that object? source is an integer and that scenario is not handled.
Steps to reproduce
Just try inputting an integer number into the Umbraco.Decimal property. In my case it's on a Block in a Block List.
The Value will be 0
My Data type is set up like this. Pretty standard.
Expected result / actual result
Integer numbers should just be casted to a decimal.
This item has been added to our backlog AB#46444
The text was updated successfully, but these errors were encountered: