artists: fix exception on show page when artist has invalid URLs.
Fix an exception on the artist show page when the artist entry contained invalid URLs such as `http://ttp://album.yahoo.co.jp/photos/my/8027988`. Caused by `ArtistUrl#domain` returning nil for certain invalid URLs, which caused `Artist#sorted_urls` to blow up. ref: https://danbooru.donmai.us/forum_posts/206488
This commit is contained in:
@@ -72,7 +72,7 @@ class ArtistURL < ApplicationRecord
|
|||||||
end
|
end
|
||||||
|
|
||||||
def domain
|
def domain
|
||||||
Danbooru::URL.parse(normalized_url)&.domain
|
Danbooru::URL.parse(normalized_url)&.domain.to_s
|
||||||
end
|
end
|
||||||
|
|
||||||
def site_name
|
def site_name
|
||||||
|
|||||||
Reference in New Issue
Block a user