From 85402cc77815e6e8978e07a48873c7207291861e Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Mon, 10 Feb 2025 18:16:32 -0800 Subject: [PATCH] Update party.rb We change setting the edit key to use the conditional assignment operator so that it doesn't get overridden when we're running tests. This shouldn't have an effect in production. --- app/models/party.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/party.rb b/app/models/party.rb index fc3dce4..3cf372c 100644 --- a/app/models/party.rb +++ b/app/models/party.rb @@ -219,7 +219,7 @@ class Party < ApplicationRecord def set_edit_key return if user - self.edit_key = Digest::SHA1.hexdigest([Time.now, rand].join) + self.edit_key ||= Digest::SHA1.hexdigest([Time.now, rand].join) end def random_string