mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 01:03:38 +08:00
FIX: Don't validate channel slug if it hasn't changed (#19498)
This is generating lots of log noise for operations that aren't even touching the slug.
This commit is contained in:
parent
155c400ec7
commit
d244eb0d7c
|
@ -21,7 +21,7 @@ class ChatChannel < ActiveRecord::Base
|
|||
},
|
||||
presence: true,
|
||||
allow_nil: true
|
||||
validate :ensure_slug_ok
|
||||
validate :ensure_slug_ok, if: :slug_changed?
|
||||
before_validation :generate_auto_slug
|
||||
|
||||
scope :public_channels,
|
||||
|
|
Loading…
Reference in New Issue
Block a user