Skip to content

Commit

Permalink
Fix the refactored condition for pure_project
Browse files Browse the repository at this point in the history
After introducing a wrong condition on a refactoring, the failed
packages were not displayed in the project status list.

Co-authored-by: Eduardo Navarro <enavarro@suse.com>
Co-authored-by: Daniel Donisa <daniel.donisa@suse.com>
  • Loading branch information
3 people committed Sep 17, 2020
1 parent 078024e commit 5ba980b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/api/app/models/project_status/calculator.rb
Expand Up @@ -22,11 +22,8 @@ def calc_status(opts = {})
projects[project_id] = project_name
end

unless opts[:pure_project]
projects.each_key do |id|
update_jobhistory(Project.find(id), mypackages) if id == @dbproj.id
end
end
selected_projects = projects.keys.select { |project_id| !opts[:pure_project] || project_id == @dbproj.id }
selected_projects.each { |project_id| update_jobhistory(Project.find(project_id), mypackages) }

# cleanup
mypackages.each_key do |key|
Expand Down

0 comments on commit 5ba980b

Please sign in to comment.