Skip to content
Snippets Groups Projects
Commit fe180f18 authored by Renato "Lond" Cerqueira's avatar Renato "Lond" Cerqueira Committed by Eugen Rochko
Browse files

Change conditional to avoid nil into string error in sidekiq (#5987)

* Change conditional to avoid nil into string error in sidekiq
When obtaining information about users with mastodon in a different
subdomain, sidekiq was giving out a 'no implicit conversion of nil into String'

* Use presence instead of blank? with ternary.
Following suggestion on PR
parent 1486fd64
No related branches found
No related tags found
No related merge requests found
......@@ -40,6 +40,6 @@ class FetchRemoteStatusService < BaseService
end
def confirmed_domain?(domain, account)
account.domain.nil? || domain.casecmp(account.domain).zero? || domain.casecmp(Addressable::URI.parse(account.remote_url || account.uri).normalized_host).zero?
account.domain.nil? || domain.casecmp(account.domain).zero? || domain.casecmp(Addressable::URI.parse(account.remote_url.presence || account.uri).normalized_host).zero?
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment