diff --git a/app/Umbraco/Umbraco.Archetype/Models/ArchetypePropertyModel.cs b/app/Umbraco/Umbraco.Archetype/Models/ArchetypePropertyModel.cs index 4d9abb4..5b1b358 100644 --- a/app/Umbraco/Umbraco.Archetype/Models/ArchetypePropertyModel.cs +++ b/app/Umbraco/Umbraco.Archetype/Models/ArchetypePropertyModel.cs @@ -73,6 +73,13 @@ namespace Archetype.Models if (value2 is T) return Attempt.Succeed((T)value2); + // If ConvertDataToSource failed try ConvertSourceToObject. + var value3 = converter.ConvertSourceToObject(properyType, value, false); + + // If the value is of type T, just return it + if (value3 is T) + return Attempt.Succeed((T)value3); + // Value is not final value type, so try a regular type conversion aswell var convertAttempt = value2.TryConvertTo(); if (convertAttempt.Success) @@ -82,4 +89,4 @@ namespace Archetype.Models return Attempt.Fail(); } } -} \ No newline at end of file +}