about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/account_migration.rb2
-rw-r--r--app/models/concerns/domain_materializable.rb1
-rw-r--r--app/models/custom_filter.rb2
-rw-r--r--app/models/form/redirect.rb2
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