Skip to content

Commit

Permalink
fix: seeds (#2023)
Browse files Browse the repository at this point in the history
Motivation
----------
Fix seeds which apparently broke in #1971.

How to test
-----------
1. `docker compose up db`
2. `bin/rails db:drop db:create db:migrate db:seed`
3. Does not fail anymore
  • Loading branch information
roschaefer authored Sep 12, 2024
1 parent 26730c1 commit 99984ad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion db/seeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
admin = User.create_or_find_by!(email: 'redaktion@tactile.news', first_name: 'Dennis', last_name: 'Schröder', password: password,
admin: true, otp_secret_key: otp_secret_key)
user = User.create_or_find_by!(email: 'contact-person@example-organization.org', first_name: 'ConactFor', last_name: 'Organization',
password: password, otp_secret_key: otp_secret_key, organization: organization)
password: password, otp_secret_key: otp_secret_key)
user.organizations << organization
organization.update(contact_person: user)
puts "Organization with name #{organization.name}"
puts "Admin with email #{admin.email}"
Expand Down

0 comments on commit 99984ad

Please sign in to comment.