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.
This commit is contained in:
Justin Edmund 2025-02-10 18:16:32 -08:00
parent 52d417a693
commit 85402cc778

View file

@ -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