Skip to content

Commit

Permalink
Resolves #4689 - Update seeds: mark users invitation_status as "acc…
Browse files Browse the repository at this point in the history
…epted" (#4705)

* Update seed users to mark invitation status accepted

* Update with PR suggestions
  • Loading branch information
lsfernandes92 authored Oct 14, 2024
1 parent 1b1e251 commit da713da
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -798,4 +798,4 @@ DEPENDENCIES
webmock (~> 3.24)

BUNDLED WITH
2.5.20
2.5.21
14 changes: 14 additions & 0 deletions db/seeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit da713da

Please sign in to comment.