summaryrefslogtreecommitdiff
path: root/app/services/ci/find_exposed_artifacts_service.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/ci/find_exposed_artifacts_service.rb')
-rw-r--r--app/services/ci/find_exposed_artifacts_service.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/services/ci/find_exposed_artifacts_service.rb b/app/services/ci/find_exposed_artifacts_service.rb
index 5c75af294bf..d268252577f 100644
--- a/app/services/ci/find_exposed_artifacts_service.rb
+++ b/app/services/ci/find_exposed_artifacts_service.rb
@@ -46,6 +46,8 @@ module Ci
# it could contain many. We only need to know whether it has 1 or more
# artifacts, so fetching the first 2 would be sufficient.
def first_2_metadata_entries_for_artifacts_paths(job)
+ return [] unless job.artifacts_metadata
+
job.artifacts_paths
.lazy
.map { |path| job.artifacts_metadata_entry(path, recursive: true) }