Fix HTTP 500 on POST /api/v1/admin/ip_blocks
(#29308)
This commit is contained in:
parent
3a762cddf6
commit
0db7558822
3 changed files with 13 additions and 1 deletions
|
@ -24,7 +24,7 @@ class IpBlock < ApplicationRecord
|
|||
sign_up_requires_approval: 5000,
|
||||
sign_up_block: 5500,
|
||||
no_access: 9999,
|
||||
}, prefix: true
|
||||
}, prefix: true, validate: true
|
||||
|
||||
validates :ip, :severity, presence: true
|
||||
validates :ip, uniqueness: true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue