mirror of
https://github.com/fergalmoran/Readarr.git
synced 2026-01-06 16:55:49 +00:00
New: Speed up API add by reworking AuthorExistsValidator
Co-authored-by: Qstick <qstick@gmail.com>
This commit is contained in:
@@ -21,7 +21,9 @@ namespace NzbDrone.Core.Validation.Paths
|
||||
return true;
|
||||
}
|
||||
|
||||
return !_authorService.GetAllAuthors().Exists(s => s.Metadata.Value.ForeignAuthorId == context.PropertyValue.ToString());
|
||||
var foreignAuthorId = context.PropertyValue.ToString();
|
||||
|
||||
return _authorService.FindById(foreignAuthorId) == null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user