summaryrefslogtreecommitdiff
path: root/app/models/ci/stage.rb
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-01-19 18:49:14 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-01-19 18:49:14 +0100
commit86217866fda66cb770ee8c9a540bf535a980eb36 (patch)
treefad8e0caec1c292628ac0a81db4beb3996b7321e /app/models/ci/stage.rb
parent73fcfb296c90746f868ec11a19477a16039ef9a5 (diff)
downloadgitlab-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.rb6
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