mirror of
https://github.com/Lidarr/Lidarr
synced 2026-03-05 20:13:12 +01:00
New: Speed up API add by reworking ArtistExistsValidator
Co-authored-by: Qstick <qstick@gmail.com>
This commit is contained in:
parent
285323ae0b
commit
19f6433829
1 changed files with 3 additions and 1 deletions
|
|
@ -21,7 +21,9 @@ protected override bool IsValid(PropertyValidatorContext context)
|
|||
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…
Reference in a new issue