mirror of
https://github.com/zoriya/Kyoo.git
synced 2026-05-30 10:55:16 -04:00
Fixing episode & library's repository
This commit is contained in:
@@ -171,6 +171,7 @@ namespace Kyoo.Controllers
|
||||
if (resetOld)
|
||||
Utility.Nullify(old);
|
||||
Utility.Complete(old, edited, x => x.GetCustomAttribute<EditableRelationAttribute>() != null);
|
||||
await Validate(old);
|
||||
await Database.SaveChangesAsync();
|
||||
return old;
|
||||
}
|
||||
@@ -185,7 +186,7 @@ namespace Kyoo.Controllers
|
||||
return Validate(resource);
|
||||
}
|
||||
|
||||
private Task Validate(T resource)
|
||||
protected virtual Task Validate(T resource)
|
||||
{
|
||||
if (string.IsNullOrEmpty(resource.Slug))
|
||||
throw new ArgumentException("Resource can't have null as a slug.");
|
||||
|
||||
Reference in New Issue
Block a user