Commit fc02778a authored by Shinya Maeda's avatar Shinya Maeda

Optimize deployment_variables method

parent d5c5cbcd
...@@ -1557,9 +1557,7 @@ class Project < ActiveRecord::Base ...@@ -1557,9 +1557,7 @@ class Project < ActiveRecord::Base
end end
def deployment_variables(environment: nil) def deployment_variables(environment: nil)
return [] unless deployment_platform(environment: environment) deployment_platform(environment: environment)&.predefined_variables || []
deployment_platform(environment: environment).predefined_variables
end end
def auto_devops_variables def auto_devops_variables
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment