diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-12-07 10:50:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-07 10:50:52 +0100 |
commit | 0194bd33fe4294ef6c1af34e907360f2980155c8 (patch) | |
tree | 39b966d8c051d08eff2ddf203051dc91ad15e01a /app/models | |
parent | fe523a304520a09f6371f45bd63b9e8988776c03 (diff) | |
parent | 16fb604c52a84a48bb729ea15e7fa8c9568ae118 (diff) |
Merge pull request #1995 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/account_migration.rb | 2 | ||||
-rw-r--r-- | app/models/concerns/domain_materializable.rb | 1 | ||||
-rw-r--r-- | app/models/custom_filter.rb | 2 | ||||
-rw-r--r-- | app/models/form/redirect.rb | 2 |
4 files changed, 3 insertions, 4 deletions
diff --git a/app/models/account_migration.rb b/app/models/account_migration.rb index 16276158d..fa8cb6013 100644 --- a/app/models/account_migration.rb +++ b/app/models/account_migration.rb @@ -59,7 +59,7 @@ class AccountMigration < ApplicationRecord def set_target_account self.target_account = ResolveAccountService.new.call(acct, skip_cache: true) - rescue Webfinger::Error, HTTP::Error, OpenSSL::SSL::SSLError, Mastodon::Error + rescue Webfinger::Error, HTTP::Error, OpenSSL::SSL::SSLError, Mastodon::Error, Addressable::URI::InvalidURIError # Validation will take care of it end diff --git a/app/models/concerns/domain_materializable.rb b/app/models/concerns/domain_materializable.rb index 798672213..0eac6878e 100644 --- a/app/models/concerns/domain_materializable.rb +++ b/app/models/concerns/domain_materializable.rb @@ -14,7 +14,6 @@ module DomainMaterializable Instance.refresh count_unique_subdomains! - end def count_unique_subdomains! diff --git a/app/models/custom_filter.rb b/app/models/custom_filter.rb index da2a91493..5a4a974be 100644 --- a/app/models/custom_filter.rb +++ b/app/models/custom_filter.rb @@ -54,7 +54,7 @@ class CustomFilter < ApplicationRecord end def irreversible=(value) - self.action = value ? :hide : :warn + self.action = ActiveModel::Type::Boolean.new.cast(value) ? :hide : :warn end def irreversible? diff --git a/app/models/form/redirect.rb b/app/models/form/redirect.rb index 795fdd057..3cd5731e6 100644 --- a/app/models/form/redirect.rb +++ b/app/models/form/redirect.rb @@ -32,7 +32,7 @@ class Form::Redirect def set_target_account @target_account = ResolveAccountService.new.call(acct, skip_cache: true) - rescue Webfinger::Error, HTTP::Error, OpenSSL::SSL::SSLError, Mastodon::Error + rescue Webfinger::Error, HTTP::Error, OpenSSL::SSL::SSLError, Mastodon::Error, Addressable::URI::InvalidURIError # Validation will take care of it end |