summaryrefslogtreecommitdiff
path: root/app/serializers/merge_requests/pipeline_entity.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/serializers/merge_requests/pipeline_entity.rb')
-rw-r--r--app/serializers/merge_requests/pipeline_entity.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/serializers/merge_requests/pipeline_entity.rb b/app/serializers/merge_requests/pipeline_entity.rb
index 76e75a8ca6d..445914fe01c 100644
--- a/app/serializers/merge_requests/pipeline_entity.rb
+++ b/app/serializers/merge_requests/pipeline_entity.rb
@@ -30,7 +30,7 @@ class MergeRequests::PipelineEntity < Grape::Entity
rel = pipeline.downloadable_artifacts
if Feature.enabled?(:non_public_artifacts, type: :development)
- rel = rel.select { |artifact| can?(request.current_user, :read_job_artifacts, artifact.job) }
+ rel = rel.select { |artifact| can?(request.current_user, :read_job_artifacts, artifact) }
end
BuildArtifactEntity.represent(rel, options.merge(project: pipeline.project))