diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-01-19 18:49:14 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-01-19 18:49:14 +0100 |
commit | 86217866fda66cb770ee8c9a540bf535a980eb36 (patch) | |
tree | fad8e0caec1c292628ac0a81db4beb3996b7321e /app/models/ci/stage.rb | |
parent | 73fcfb296c90746f868ec11a19477a16039ef9a5 (diff) | |
download | gitlab-ce-86217866fda66cb770ee8c9a540bf535a980eb36.tar.gz |
Fix warnings argument memoization in CI/CD stagefeature/success-warning-icons-in-stages-builds
Diffstat (limited to 'app/models/ci/stage.rb')
-rw-r--r-- | app/models/ci/stage.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/ci/stage.rb b/app/models/ci/stage.rb index ca76d82f358..ca74c91b062 100644 --- a/app/models/ci/stage.rb +++ b/app/models/ci/stage.rb @@ -46,7 +46,11 @@ module Ci end def has_warnings? - @warnings ||= statuses.latest.failed_but_allowed.any? + if @warnings.nil? + statuses.latest.failed_but_allowed.any? + else + @warnings + end end end end |