fixed broken tests.

pull/23/head
kay.one 12 years ago
parent eb90040dd6
commit 1adc2892db

@ -35,25 +35,20 @@ namespace NzbDrone.Core.Datastore
modelBase.Id = _indexProvider.Next(obj.GetType());
}
foreach (var propertyInfo in GetPotentialProperties(obj.GetType()))
{
var propValue = propertyInfo.GetValue(obj, null);
var list = propValue as IEnumerable;
var list = obj as IEnumerable;
if (list != null)
{
foreach (var item in list)
{
EnsureIds(item, context);
}
return;
}
else
foreach (var propertyInfo in GetPotentialProperties(obj.GetType()))
{
var propValue = propertyInfo.GetValue(obj, null);
EnsureIds(propValue, context);
}
}
}

Loading…
Cancel
Save