about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-12-07 00:10:53 +0100
committerGitHub <noreply@github.com>2022-12-07 00:10:53 +0100
commit69137f4a90874442cc5fefdf86dad7c4a4884bdc (patch)
tree3c02e14ef8744b5db3f52a23a2196fd28a1cf165 /app/models
parentf80c3d40e81b0955e4d5d1df76a2eb9efe1e711a (diff)
Fix irreversible and whole_word parameters handling in /api/v1/filters (#21988)
Fixes #21965
Diffstat (limited to 'app/models')
-rw-r--r--app/models/custom_filter.rb2
1 files changed, 1 insertions, 1 deletions
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?