mirror of
https://github.com/Readarr/Readarr
synced 2025-12-24 17:24:13 +01:00
New: Speed up API add by reworking AuthorExistsValidator
Co-authored-by: Qstick <qstick@gmail.com>
This commit is contained in:
parent
0e2d39f580
commit
09d44726a4
1 changed files with 3 additions and 1 deletions
|
|
@ -21,7 +21,9 @@ protected override bool IsValid(PropertyValidatorContext context)
|
|||
return true;
|
||||
}
|
||||
|
||||
return !_authorService.GetAllAuthors().Exists(s => s.Metadata.Value.ForeignAuthorId == context.PropertyValue.ToString());
|
||||
var foreignAuthorId = context.PropertyValue.ToString();
|
||||
|
||||
return _authorService.FindById(foreignAuthorId) == null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue