]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/user_block.rb
Enable active_record.belongs_to_required_by_default
[rails.git] / app / models / user_block.rb
index 47ff9ff08abcb4359476f830da79fa714b2d344c..46a8c282b3c18ba8d3b10f9554fe54cde8a1f8ae 100644 (file)
@@ -30,7 +30,7 @@ class UserBlock < ApplicationRecord
 
   belongs_to :user, :class_name => "User"
   belongs_to :creator, :class_name => "User"
 
   belongs_to :user, :class_name => "User"
   belongs_to :creator, :class_name => "User"
-  belongs_to :revoker, :class_name => "User"
+  belongs_to :revoker, :class_name => "User", :optional => true
 
   PERIODS = Settings.user_block_periods
 
 
   PERIODS = Settings.user_block_periods