Skip to content
This repository has been archived by the owner on Mar 7, 2019. It is now read-only.

Commit

Permalink
PVC: Return empty Archetype instead of null when empty/errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tomfulton committed Mar 12, 2014
1 parent cc92cd2 commit dd453fc
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ public override bool IsConverter(PublishedPropertyType propertyType)

public override object ConvertDataToSource(PublishedPropertyType propertyType, object source, bool preview)
{
var defaultValue = new Models.Archetype();

if (source == null)
return null;
return defaultValue;

var sourceString = source.ToString();

Expand Down Expand Up @@ -79,11 +81,11 @@ public override object ConvertDataToSource(PublishedPropertyType propertyType, o
}
catch (Exception ex)
{
return null;
return defaultValue;
}
}

return sourceString;
return defaultValue;
}

internal ArchetypePreValue GetArchetypePreValueFromDataTypeId(int dataTypeId)
Expand Down

0 comments on commit dd453fc

Please sign in to comment.