New: Speed up API add by reworking AuthorExistsValidator

Co-authored-by: Qstick <qstick@gmail.com>
pull/2639/head
Bogdan 11 months ago
parent 0e2d39f580
commit 09d44726a4

@ -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;
}
}
}

Loading…
Cancel
Save