We have moved to GitHub Issues
Created by Robert Copilau 08 Feb 2018, 11:00:26 Updated by Jacob Midtgaard-Olesen 23 Apr 2018, 13:53:59
Relates to: U4-10944
Have added a comment on the PR, can you have a look?
Also... why was the Nullable thing preventing decimal editor from saving? What I'm not sure of is, we want to convert to ''target'' which is, say, int? aka Nullable
The problem I encountered was that
Convert.ChangeTyper will fail if the target was a nullable type, decimal in our case.
I followed this StackOverflow [answer |https://stackoverflow.com/questions/19811583/invalid-cast-from-system-double-to-system-nullable].
"Not a supported usage of Convert.ChangeType. You need to give it the non-nullable form, i.e. double."
"but with your code what we'll return now is not an instance of target?" It will return a "unnullable" instance of target if it was nullable.
Ah so we wanted to convert to eg
Weird, 'cos a simple test such as
"100.001".TryConvertTo<decimal?>(); works out-of-the-box?
details: create a content type with a decimal property and try to save some values: no error, but the value is lost.
Commented on the PR
I've pushed updates to the PR and commented on it. The resulting changes are pretty minimal.
good now, merged
Backwards Compatible: True
Affected versions: 7.7.9, 7.7.10
Due in version: 7.7.11, 7.8.1
Story Points: 1