Fix for U4-5698 - EntityService.GetObjectType throws for deleted Id's

This commit is contained in:
Jeavon Leopold
2014-10-28 08:46:07 +00:00
parent ff8f9bb6f4
commit 69c3962f21

View File

@@ -562,6 +562,12 @@ namespace Umbraco.Core.Persistence
{
object val = cmd.ExecuteScalarWithRetry();
OnExecutedCommand(cmd);
if (val == null && typeof(T) == typeof(Guid))
{
val = Guid.Empty;
}
return (T)Convert.ChangeType(val, typeof(T));
}
}