diff --git a/Gemfile.lock b/Gemfile.lock index b0e65676e1..e105eb0cec 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -798,4 +798,4 @@ DEPENDENCIES webmock (~> 3.24) BUNDLED WITH - 2.5.20 + 2.5.21 diff --git a/db/seeds.rb b/db/seeds.rb index dc544ab2a4..55c5a3d308 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -865,3 +865,17 @@ def seed_quantity(item_name, organization, storage_location, quantity) ] ) TransferCreateService.call(transfer) + +# ---------------------------------------------------------------------------- +# Users invitation status +# ---------------------------------------------------------------------------- +# Mark users `invitation_status` as `accepted` +# +# Addresses and resolves issue #4689, which can be found in: +# https://github.com/rubyforgood/human-essentials/issues/4689 +User.where(invitation_token: nil).each do |user| + user.update!( + invitation_sent_at: Time.current, + invitation_accepted_at: Time.current + ) +end \ No newline at end of file