Fix #5002: "Urls url has already been taken" when submitting duplicate urls with different capitalization

Fix URLs being normalized after checking for duplicates rather than
before, which meant that URLs that differed in capitalization weren't
detected as duplicates.
This commit is contained in:
evazion
2022-02-08 17:38:47 -06:00
parent 67d834775d
commit 21c0d55aa4
3 changed files with 19 additions and 15 deletions

View File

@@ -149,7 +149,7 @@ module ArtistFinder
# @param url [String] the artist profile URL
# @return [Array<Artist>] the list of matching artists
def find_artists(url)
url = ArtistUrl.normalize(url)
url = ArtistUrl.normalize_normalized_url(url)
artists = []
while artists.empty? && url.size > 10