mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-10 07:50:33 -07:00
don't show admin data if that category is missing on a page
This commit is contained in:
parent
9ff4cf0d10
commit
56157a612d
1 changed files with 1 additions and 0 deletions
|
|
@ -27,6 +27,7 @@ class CategoriesController < ApplicationController
|
|||
@child_school_categories = SchoolCategory.for_parent_category(@school, @category).in(@year).valid.to_a
|
||||
missing_categories = Category.for_parent(@category) - @child_school_categories.map(&:category)
|
||||
missing_categories.each do |category|
|
||||
next if category.benchmark.present?
|
||||
@child_school_categories << category.school_categories.new(school: @school)
|
||||
end
|
||||
@questions = @category.questions.created_in(@year)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue