about summary refs log tree commit diff
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-12-01 10:15:05 -0600
committermultiple creatures <dev@multiple-creature.party>2019-12-01 10:15:05 -0600
commit59b8f3b6a3c544985432fbc2712feb8eb0c2e6f5 (patch)
tree3462c1e7463102468ad3ef3ccb6358940f2791b9
parent3bef7b280fc3a1b27359a855250c765699a6c586 (diff)
correctly detect domain policy changes
-rw-r--r--app/controllers/admin/domain_blocks_controller.rb1
-rw-r--r--app/models/domain_block.rb1
2 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/admin/domain_blocks_controller.rb b/app/controllers/admin/domain_blocks_controller.rb
index 859bdd6d3..bba47082d 100644
--- a/app/controllers/admin/domain_blocks_controller.rb
+++ b/app/controllers/admin/domain_blocks_controller.rb
@@ -14,7 +14,6 @@ module Admin
 
       resource_params[:domain].strip! if resource_params[:domain].present?
       resource_params[:reason].strip! if resource_params[:reason].present?
-      resource_params[:processing] = true
       @domain_block = DomainBlock.new(resource_params)
       existing_domain_block = resource_params[:domain].present? ? DomainBlock.find_by(domain: resource_params[:domain].strip) : nil
 
diff --git a/app/models/domain_block.rb b/app/models/domain_block.rb
index 4bb35ef8d..9dd9a9085 100644
--- a/app/models/domain_block.rb
+++ b/app/models/domain_block.rb
@@ -70,6 +70,7 @@ class DomainBlock < ApplicationRecord
 
   def set_processing
     return if processing
+    return unless (changed & %w(severity suspended_at silenced_at force_sensitive reject_media reject_reports reject_unknown)).any?
     self.processing = true
   end
 end