diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-01 18:08:33 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-01 18:08:33 +0000 |
commit | 24d67ec55454fc6f4e8e80bf7c8dc5bc677e8514 (patch) | |
tree | 6ce73c2fd8ec96c6f043c4a1403c0991fd448b81 /app/controllers/oauth | |
parent | a0fdcfcdd514c2af98f18cadfa75f8a6a85b4d2c (diff) | |
download | gitlab-ce-24d67ec55454fc6f4e8e80bf7c8dc5bc677e8514.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers/oauth')
-rw-r--r-- | app/controllers/oauth/applications_controller.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/oauth/applications_controller.rb b/app/controllers/oauth/applications_controller.rb index f425e996c2b..a996bad3fac 100644 --- a/app/controllers/oauth/applications_controller.rb +++ b/app/controllers/oauth/applications_controller.rb @@ -53,7 +53,9 @@ class Oauth::ApplicationsController < Doorkeeper::ApplicationsController def set_index_vars @applications = current_user.oauth_applications.load - @authorized_tokens = current_user.oauth_authorized_tokens.preload(:application).order(created_at: :desc).load # rubocop: disable CodeReuse/ActiveRecord + @authorized_tokens = current_user.oauth_authorized_tokens + .latest_per_application + .preload_application # Don't overwrite a value possibly set by `create` @application ||= Doorkeeper::Application.new |