Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance: Optimize authorized students query for lower-access users #2574

Merged
merged 1 commit into from Aug 29, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions app/models/educator_label.rb
Expand Up @@ -67,8 +67,7 @@ def self.dynamic_labels_for_educator(educator)
end

# Levels link: Anyone at SHS (can also be added manually)
shs_school_id = School.find_by_local_id('SHS').try(:id)
if shs_school_id.present? && educator.school_id == shs_school_id
if educator.school.present? && educator.school.local_id == 'SHS'
dynamic_labels << 'should_show_levels_shs_link'
end

Expand Down