about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/session_activation.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/models/session_activation.rb b/app/models/session_activation.rb
index 02a918e8a..887e3e3bd 100644
--- a/app/models/session_activation.rb
+++ b/app/models/session_activation.rb
@@ -69,9 +69,7 @@ class SessionActivation < ApplicationRecord
   def assign_access_token
     superapp = Doorkeeper::Application.find_by(superapp: true)
 
-    return if superapp.nil?
-
-    self.access_token = Doorkeeper::AccessToken.create!(application_id: superapp.id,
+    self.access_token = Doorkeeper::AccessToken.create!(application_id: superapp&.id,
                                                         resource_owner_id: user_id,
                                                         scopes: 'read write follow',
                                                         expires_in: Doorkeeper.configuration.access_token_expires_in,