From c0aa75d5a4b2a80cf2cbcc52b9447a422b14e0d1 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Wed, 9 Oct 2024 13:04:49 -0400 Subject: [PATCH] Always validate inbox_url presence on relay --- app/models/relay.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/relay.rb b/app/models/relay.rb index f652b4864b..beae1148a5 100644 --- a/app/models/relay.rb +++ b/app/models/relay.rb @@ -13,7 +13,8 @@ # class Relay < ApplicationRecord - validates :inbox_url, presence: true, uniqueness: true, url: true, if: :will_save_change_to_inbox_url? + validates :inbox_url, presence: true + validates :inbox_url, uniqueness: true, url: true, if: :will_save_change_to_inbox_url? enum :state, { idle: 0, pending: 1, accepted: 2, rejected: 3 }