Fix IP blocks not having a unique index (#19456)
This commit is contained in:
parent
6f01111863
commit
487d81fb92
4 changed files with 21 additions and 2 deletions
|
@ -25,6 +25,7 @@ class IpBlock < ApplicationRecord
|
|||
}
|
||||
|
||||
validates :ip, :severity, presence: true
|
||||
validates :ip, uniqueness: true
|
||||
|
||||
after_commit :reset_cache
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue