New: Speed up API add by reworking ArtistExistsValidator

Co-authored-by: Qstick <qstick@gmail.com>
pull/3841/head
Bogdan 1 year ago
parent 285323ae0b
commit 19f6433829

@ -21,7 +21,9 @@ namespace NzbDrone.Core.Validation.Paths
return true;
}
return !_artistService.GetAllArtists().Exists(s => s.Metadata.Value.ForeignArtistId == context.PropertyValue.ToString());
var foreignArtistId = context.PropertyValue.ToString();
return _artistService.FindById(foreignArtistId) == null;
}
}
}

Loading…
Cancel
Save