Skip to content
Snippets Groups Projects
Commit 3a07e85c authored by Remi Rampin's avatar Remi Rampin Committed by Eugen Rochko
Browse files

Fix db/seeds.rb (#9738)

Add "agreement: true" to avoid:
> ActiveRecord::RecordInvalid: Validation failed: Agreement must be accepted
parent bd5a8c77
No related branches found
No related tags found
No related merge requests found
......@@ -4,5 +4,5 @@ if Rails.env.development?
domain = ENV['LOCAL_DOMAIN'] || Rails.configuration.x.local_domain
admin = Account.where(username: 'admin').first_or_initialize(username: 'admin')
admin.save(validate: false)
User.where(email: "admin@#{domain}").first_or_initialize(email: "admin@#{domain}", password: 'mastodonadmin', password_confirmation: 'mastodonadmin', confirmed_at: Time.now.utc, admin: true, account: admin).save!
User.where(email: "admin@#{domain}").first_or_initialize(email: "admin@#{domain}", password: 'mastodonadmin', password_confirmation: 'mastodonadmin', confirmed_at: Time.now.utc, admin: true, account: admin, agreement: true).save!
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment