Adds unit tests for DynamicNode and DynamicPublishedContent, fixes both when querying for recursive properties.

Fixes: #U4-1839
This commit is contained in:
Shannon Deminick
2013-03-05 21:00:16 +06:00
parent 046da1a8ce
commit a765f36d24
3 changed files with 47 additions and 1 deletions

View File

@@ -637,7 +637,14 @@ namespace Umbraco.Web.Models
public IPublishedContentProperty GetProperty(string alias)
{
return GetProperty(alias, false);
var prop = GetProperty(alias, false);
if (prop == null && alias.StartsWith("_"))
{
//if it is prefixed and the first result failed, try to get it by recursive
var recursiveAlias = alias.Substring(1, alias.Length - 1);
return GetProperty(recursiveAlias, true);
}
return prop;
}
public IPublishedContentProperty GetProperty(string alias, bool recursive)
{