From d244eb0d7c027415a86e6821291fc69eebde374b Mon Sep 17 00:00:00 2001 From: Daniel Waterworth Date: Mon, 19 Dec 2022 12:11:51 -0600 Subject: [PATCH] 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. --- plugins/chat/app/models/chat_channel.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/chat/app/models/chat_channel.rb b/plugins/chat/app/models/chat_channel.rb index 7f537161ee4..f46746592d3 100644 --- a/plugins/chat/app/models/chat_channel.rb +++ b/plugins/chat/app/models/chat_channel.rb @@ -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,