From 5de53f1841e7e3e77fc13d0887e7d765f9f91a9e Mon Sep 17 00:00:00 2001 From: Dan Milne Date: Tue, 4 Nov 2025 21:21:00 +1100 Subject: [PATCH] bug fix --- app/models/application.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/application.rb b/app/models/application.rb index 9204b5a..63c065c 100644 --- a/app/models/application.rb +++ b/app/models/application.rb @@ -13,7 +13,7 @@ class Application < ApplicationRecord validates :app_type, presence: true, inclusion: { in: %w[oidc forward_auth] } validates :client_id, uniqueness: { allow_nil: true } - validates :client_secret, presence: true, if: -> { oidc? && client_secret_changed? } + validates :client_secret, presence: true, if: -> { oidc? && will_save_change_to_client_secret? } validates :domain_pattern, presence: true, uniqueness: { case_sensitive: false }, if: :forward_auth? validates :landing_url, format: { with: URI::regexp(%w[http https]), allow_nil: true, message: "must be a valid URL" }