Skip to content

Commit

Permalink
Remove failed_status_checks from StagingProject
Browse files Browse the repository at this point in the history
it's just a long variant of checks.failed
  • Loading branch information
coolo committed Nov 22, 2018
1 parent fdac465 commit b90137f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions src/api/app/models/staging/staging_project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,6 @@ def missing_checks
@missing_checks ||= (relevant_status_reports_for_repositories + relevant_status_reports_for_architectures).map(&:missing_checks).flatten
end

def failed_status_checks
@failed_status_checks ||= relevant_checks.where(state: Status::Check::FAILED_STATES) +
relevant_checks_for_architectures.where(state: Status::Check::FAILED_STATES)
end

private

def cache_problems
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
max_shown = 5
project_class = staging_project.name.tr(':', '_')
item_project_class = 'hidden-item-' + project_class
checks_problems = staging_project.failed_status_checks
checks_problems = staging_project.checks.failed
build_problems = staging_project.problems
total_problems = checks_problems.length + build_problems.length

Expand Down

0 comments on commit b90137f

Please sign in to comment.