Added constant for the prevalue alias.
(As we reference to this in the Courier DataResolver)
This commit is contained in:
@@ -3,5 +3,7 @@
|
||||
public static class Constants
|
||||
{
|
||||
public const string PropertyEditorAlias = "Imulus.Archetype";
|
||||
|
||||
public const string PreValueAlias = "archetypeConfig";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ namespace Archetype.Umbraco.PropertyConverters
|
||||
var preValues = Services.DataTypeService.GetPreValuesCollectionByDataTypeId(dataTypeId);
|
||||
|
||||
var configJson = preValues.IsDictionaryBased
|
||||
? preValues.PreValuesAsDictionary["archetypeConfig"].Value
|
||||
? preValues.PreValuesAsDictionary[Constants.PreValueAlias].Value
|
||||
: preValues.PreValuesAsArray.First().Value;
|
||||
|
||||
var config = JsonConvert.DeserializeObject<Models.ArchetypePreValue>(configJson, _jsonSettings);
|
||||
|
||||
Reference in New Issue
Block a user