diff options
author | Remi Rampin <remirampin@gmail.com> | 2019-01-07 02:14:53 -0500 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2019-01-07 08:14:53 +0100 |
commit | 3a07e85c4d17f6670998188417205395f6857a67 (patch) | |
tree | 794f1cafb291d6d2d97be8cdf64d913c54c0196b /db/seeds.rb | |
parent | bd5a8c7765102a166ec8909e4a3b7781ec5537d6 (diff) |
Fix db/seeds.rb (#9738)
Add "agreement: true" to avoid: > ActiveRecord::RecordInvalid: Validation failed: Agreement must be accepted
Diffstat (limited to 'db/seeds.rb')
-rw-r--r-- | db/seeds.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/db/seeds.rb b/db/seeds.rb index 6adfeed8d..cf62ebf39 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -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 |