summaryrefslogtreecommitdiff
path: root/app/models/ci
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-07-04 22:56:23 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-07-04 22:56:23 +0800
commitb5a2319764be166c5db1d66d1da1dd608555bb0c (patch)
treef76769711e708762ed07063a4007863acd7c5ce7 /app/models/ci
parent596f46881f2f70cfca8e30794b4c9572a8644ceb (diff)
downloadgitlab-ce-b5a2319764be166c5db1d66d1da1dd608555bb0c.tar.gz
Explicitly set to nil when artifacts don't exist:
Feedback from: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4964#note_12867273
Diffstat (limited to 'app/models/ci')
-rw-r--r--app/models/ci/build.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index 48f88849989..5c973749975 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -384,6 +384,8 @@ module Ci
def update_artifacts_size
self.artifacts_size = if artifacts_file.exists?
artifacts_file.size
+ else
+ nil
end
end