Added constant for the prevalue alias.

(As we reference to this in the Courier DataResolver)
This commit is contained in:
leekelleher
2014-02-13 17:30:28 +00:00
parent 4c8bbd5d8f
commit 9a712acd6a
2 changed files with 3 additions and 1 deletions
@@ -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);