diff options
author | Nick Thomas <nick@gitlab.com> | 2019-08-13 10:05:37 +0000 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2019-08-13 10:05:37 +0000 |
commit | 35994fe091b65c902c465f3159a3efe881e1df77 (patch) | |
tree | faa5725d18436209756c3a55a7a0ca72e97a6a26 /app | |
parent | 266211b9c4edc308d7c99ed6b80b3a1bd01ff1f3 (diff) | |
parent | dcdc04ab46f4be77db52454dc634593595ae7612 (diff) | |
download | gitlab-ce-35994fe091b65c902c465f3159a3efe881e1df77.tar.gz |
Merge branch '65963-avoid-extra-query-allowed-to-uninstall' into 'master'
Fix a performance issue in Helm#can_uninstall?
Closes #65963
See merge request gitlab-org/gitlab-ce!31751
Diffstat (limited to 'app')
-rw-r--r-- | app/models/clusters/applications/helm.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/clusters/applications/helm.rb b/app/models/clusters/applications/helm.rb index 3a175fec148..455cf200fbc 100644 --- a/app/models/clusters/applications/helm.rb +++ b/app/models/clusters/applications/helm.rb @@ -41,7 +41,7 @@ module Clusters extra_apps = Clusters::Applications::Helm.where('EXISTS (?)', klass.select(1).where(cluster_id: cluster_id)) - applications = applications.present? ? applications.or(extra_apps) : extra_apps + applications = applications ? applications.or(extra_apps) : extra_apps end !applications.exists? |