Finding the issue in the validator of the local repository's edit

This commit is contained in:
Zoe Roux
2021-01-24 23:11:26 +01:00
parent 3a2294ed2d
commit 4a15fa8363
5 changed files with 6 additions and 4 deletions
+3 -1
View File
@@ -231,8 +231,10 @@ namespace Kyoo.Controllers
foreach (PropertyInfo property in typeof(T).GetProperties()
.Where(x => typeof(IEnumerable).IsAssignableFrom(x.PropertyType)
&& !typeof(string).IsAssignableFrom(x.PropertyType)))
&& !typeof(string).IsAssignableFrom(x.PropertyType))
{
// TODO For DE classes (like ShowDE), the basic ienumerable should not be verified (for exemple, GenreLinks should be checked & not Genres).
Console.WriteLine($"Validating {property.Name}");
object value = property.GetValue(resource);
if (value == null || value is ICollection || Utility.IsOfGenericType(value, typeof(ICollection<>)))
continue;