diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-12-07 09:03:42 +0100 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2022-12-07 09:03:42 +0100 |
commit | 9a3d91f629ae0e8f722d56b8634bfad299ab9f04 (patch) | |
tree | 324a2b04d34049d7f31a041d6a44b23d45a46e6b /app/models | |
parent | fe523a304520a09f6371f45bd63b9e8988776c03 (diff) | |
parent | b59fb28e90bc21d6fd1a6bafd13cfbd81ab5be54 (diff) |
Merge branch 'main' into glitch-soc/merge-upstream
Conflicts: - `app/models/concerns/domain_materializable.rb`: Fixed a code style issue upstream in a PR that got merged in glitch-soc earlier. Changed the code to match upstream's.
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 |