mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 21:10:17 +08:00
FIX: Validate auto_close_hours category setting
This prevents server errors when the value is set too high
This commit is contained in:
parent
e387adadf8
commit
19c9a6699a
|
@ -50,6 +50,8 @@ class Category < ActiveRecord::Base
|
|||
|
||||
validate :ensure_slug
|
||||
|
||||
validates :auto_close_hours, numericality: { greater_than: 0, less_than_or_equal_to: 87600 }, allow_nil: true
|
||||
|
||||
after_create :create_category_definition
|
||||
|
||||
before_save :apply_permissions
|
||||
|
|
Loading…
Reference in New Issue
Block a user