Skip to content

Commit

Permalink
Merge pull request #76 from rasmuseeg/patch-2
Browse files Browse the repository at this point in the history
Fixes #74
  • Loading branch information
mattbrailsford authored Nov 9, 2017
2 parents 10ed9b5 + fba9c1d commit 4c0f7a0
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ public override string ConvertDbToString(Property property, PropertyType propert
var value = JsonConvert.DeserializeObject<VortoValue>(property.Value.ToString());
if (value.Values != null)
{
if(value.DtdGuid == Guid.Empty)
{
var vortoDtd = dataTypeService.GetDataTypeDefinitionById(propertyType.DataTypeDefinitionId);
value.DtdGuid = vortoDtd.Key;
}
var dtd = VortoHelper.GetTargetDataTypeDefinition(value.DtdGuid);
var propEditor = PropertyEditorResolver.Current.GetByAlias(dtd.PropertyEditorAlias);
var propType = new PropertyType(dtd);
Expand All @@ -129,7 +134,7 @@ public override string ConvertDbToString(Property property, PropertyType propert

return base.ConvertDbToString(prop2, propertyType, dataTypeService);
}

public override object ConvertDbToEditor(Property property, PropertyType propertyType, IDataTypeService dataTypeService)
{
if (property.Value == null || property.Value.ToString().IsNullOrWhiteSpace())
Expand Down

0 comments on commit 4c0f7a0

Please sign in to comment.