diff --git a/app/views/api/pm/pipelines/index.json.jbuilder b/app/views/api/pm/pipelines/index.json.jbuilder index 430873132..f13d013da 100644 --- a/app/views/api/pm/pipelines/index.json.jbuilder +++ b/app/views/api/pm/pipelines/index.json.jbuilder @@ -1,7 +1,7 @@ json.status 0 json.message "success" json.count @pipelines.total_count -json.projects @pipelines.map(&:project_id).each do |project_id| +json.projects @pipelines.map(&:project_id).uniq.each do |project_id| json.id project_id project = Project.find_by(id: project_id) if project.present?