deviantart: fix page_url for when api data is unavailable.

The api data is unavailable when we can't scrape the uuid, either
because the work is deleted or because the work is actually a sta.sh
upload and we weren't given the sta.sh page in the referer url.
This commit is contained in:
evazion
2018-09-10 19:21:12 -05:00
parent c9300cc54e
commit bfed323988

View File

@@ -87,8 +87,13 @@ module Sources
end
def page_url
return "" if api_deviation.blank?
api_deviation[:url]
if api_deviation.present?
api_deviation[:url]
elsif api_url.present?
api_url
else
""
end
end
def profile_url