mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-08 15:08:15 -07:00
fixing bug
This commit is contained in:
parent
93b0267dad
commit
435b91ad4c
1 changed files with 3 additions and 1 deletions
|
|
@ -17,7 +17,9 @@ class SchoolCategory < ApplicationRecord
|
|||
scope :valid, -> { where("zscore is not null or valid_child_count is not null") }
|
||||
|
||||
def admin?
|
||||
category.child_categories.each { |cc| return false if cc.benchmark.blank? }
|
||||
child_categories = category.child_categories
|
||||
return false if child_categories.blank?
|
||||
child_categories.each { |cc| return false if cc.benchmark.blank? }
|
||||
return true
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue