mirror of
https://github.com/Radarr/Radarr.git
synced 2026-03-29 18:15:37 -04:00
fixed broken tests.
This commit is contained in:
@@ -35,25 +35,20 @@ namespace NzbDrone.Core.Datastore
|
||||
modelBase.Id = _indexProvider.Next(obj.GetType());
|
||||
}
|
||||
|
||||
var list = obj as IEnumerable;
|
||||
if (list != null)
|
||||
{
|
||||
foreach (var item in list)
|
||||
{
|
||||
EnsureIds(item, context);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (var propertyInfo in GetPotentialProperties(obj.GetType()))
|
||||
{
|
||||
var propValue = propertyInfo.GetValue(obj, null);
|
||||
|
||||
var list = propValue as IEnumerable;
|
||||
|
||||
if (list != null)
|
||||
{
|
||||
foreach (var item in list)
|
||||
{
|
||||
EnsureIds(item, context);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
EnsureIds(propValue, context);
|
||||
|
||||
}
|
||||
|
||||
EnsureIds(propValue, context);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user