diff options
author | Thong Kuah <tkuah@gitlab.com> | 2019-06-19 23:59:47 +1200 |
---|---|---|
committer | Thong Kuah <tkuah@gitlab.com> | 2019-06-20 00:02:30 +1200 |
commit | 65b6a37fa6656fe2956a6a66011a6630545af229 (patch) | |
tree | f70616d4dd007aaf7fe69516f187f2b8e0156b48 | |
parent | e99a55ffa775179da2868624c4811459f996cb02 (diff) | |
download | gitlab-ce-65b6a37fa6656fe2956a6a66011a6630545af229.tar.gz |
Run least expensive method first - #has_terminals?
available? is much cheaper than deployment_platform
-rw-r--r-- | app/models/environment.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/environment.rb b/app/models/environment.rb index 09ab8e61a51..1f7e8815c8e 100644 --- a/app/models/environment.rb +++ b/app/models/environment.rb @@ -155,7 +155,7 @@ class Environment < ApplicationRecord end def has_terminals? - deployment_platform.present? && available? && last_deployment.present? + available? && deployment_platform.present? && last_deployment.present? end def terminals |