about summary refs log tree commit diff
path: root/db/seeds.rb
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-07-23 17:21:55 +0200
committerGitHub <noreply@github.com>2019-07-23 17:21:55 +0200
commit08325db62bcc4d5d530513c615bc1c733f166239 (patch)
tree13cffcc0c8d6ed258928a89c1b328a055c54f2d3 /db/seeds.rb
parent6db5669818cce459b9bb916665541b7b8f5d5155 (diff)
parent48c68eafb73d2e697dab25ec55c235da4daf1cf8 (diff)
Merge pull request #1174 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'db/seeds.rb')
-rw-r--r--db/seeds.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/db/seeds.rb b/db/seeds.rb
index 5f43fbac8..0bfb5d0db 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -1,7 +1,8 @@
-Doorkeeper::Application.create!(name: 'Web', superapp: true, redirect_uri: Doorkeeper.configuration.native_redirect_uri, scopes: 'read write follow')
+Doorkeeper::Application.create!(name: 'Web', superapp: true, redirect_uri: Doorkeeper.configuration.native_redirect_uri, scopes: 'read write follow push')
 
 domain = ENV['LOCAL_DOMAIN'] || Rails.configuration.x.local_domain
-Account.create!(id: -99, actor_type: 'Application', locked: true, username: domain)
+account = Account.find_or_initialize_by(id: -99, actor_type: 'Application', locked: true, username: domain)
+account.save!
 
 if Rails.env.development?
   admin  = Account.where(username: 'admin').first_or_initialize(username: 'admin')