about summary refs log tree commit diff
path: root/app/controllers/oauth/tokens_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/oauth/tokens_controller.rb')
-rw-r--r--app/controllers/oauth/tokens_controller.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/oauth/tokens_controller.rb b/app/controllers/oauth/tokens_controller.rb
index fa6d58f25..34087b20b 100644
--- a/app/controllers/oauth/tokens_controller.rb
+++ b/app/controllers/oauth/tokens_controller.rb
@@ -2,7 +2,8 @@
 
 class Oauth::TokensController < Doorkeeper::TokensController
   def revoke
-    unsubscribe_for_token if authorized? && token.accessible?
+    unsubscribe_for_token if token.present? && authorized? && token.accessible?
+
     super
   end