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
这个提交存在于:
父节点
1486fd64cc
当前提交
fe180f18ff
共有 1 个文件被更改,包括 1 次插入 和 1 次删除
|
|
@ -40,6 +40,6 @@ class FetchRemoteStatusService < BaseService
|
||||||
end
|
end
|
||||||
|
|
||||||
def confirmed_domain?(domain, account)
|
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
|
||||||
end
|
end
|
||||||
|
|
|
||||||
正在加载…
添加表格
在新工单中引用