Fix #3859: Related tag and find artist don't run when fetch data fails.
Fixes an exception in the artist finder caused by searching for a nil profile_url.
This commit is contained in:
@@ -71,11 +71,11 @@ module Sources
|
||||
|
||||
# A link to the artist's profile page on the site.
|
||||
def profile_url
|
||||
nil
|
||||
""
|
||||
end
|
||||
|
||||
def artist_name
|
||||
raise NotImplementedError
|
||||
""
|
||||
end
|
||||
|
||||
def artist_commentary_title
|
||||
@@ -129,7 +129,8 @@ module Sources
|
||||
end
|
||||
|
||||
def artists
|
||||
Artist.find_artists(profile_url)
|
||||
url = profile_url.presence || image_url.presence
|
||||
Artist.find_artists(url)
|
||||
end
|
||||
|
||||
def file_url
|
||||
|
||||
@@ -13,8 +13,8 @@ module Sources
|
||||
url
|
||||
end
|
||||
|
||||
def artist_name
|
||||
nil
|
||||
def canonical_url
|
||||
image_url
|
||||
end
|
||||
|
||||
def normalized_for_artist_finder?
|
||||
@@ -38,10 +38,6 @@ module Sources
|
||||
def unique_id
|
||||
url
|
||||
end
|
||||
|
||||
def rewrite(url, headers, data)
|
||||
return [url, headers, data]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user