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,
|
presence: true,
|
||||||
allow_nil: true
|
allow_nil: true
|
||||||
validate :ensure_slug_ok
|
validate :ensure_slug_ok, if: :slug_changed?
|
||||||
before_validation :generate_auto_slug
|
before_validation :generate_auto_slug
|
||||||
|
|
||||||
scope :public_channels,
|
scope :public_channels,
|
||||||
|
|
Loading…
Reference in New Issue