Commit 9e60d57d authored by Lin Jen-Shin's avatar Lin Jen-Shin

Move the condition to persisted_environment_variables

Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11695?resolved_conflicts=true#note_30797842
parent 0e5ee119
......@@ -201,10 +201,7 @@ module Ci
# All variables, including those dependent on other variables
def variables
variables = simple_variables
variables.concat(persisted_environment_variables) if
persisted_environment
variables
simple_variables.concat(persisted_environment_variables)
end
def merge_request
......@@ -499,6 +496,8 @@ module Ci
end
def persisted_environment_variables
return [] unless persisted_environment
variables = persisted_environment.predefined_variables
if environment_url
......
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