Skip to content

Commit

Permalink
hotfix for class section teacher counts
Browse files Browse the repository at this point in the history
  • Loading branch information
milescalabresi authored and willgearty committed Mar 9, 2021
1 parent a2bf093 commit de5861c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions esp/esp/program/modules/handlers/teachercheckinmodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,8 @@ def getMissingTeachers(self, prog, date=None, starttime=None, when=None,
or sections_by_class[section.parent_class_id].begin_time > section.begin_time):
# Precompute some things and pack them on the section.
teacher_status = [teacher.id in arrived for teacher in section.teachers]
section.all_arrived = all(teacher_status) and section.teachers.count() > 0
section.any_arrived = any(teacher_status) and section.teachers.count() > 0
section.all_arrived = all(teacher_status) and len(section.teachers) > 0
section.any_arrived = any(teacher_status) and len(section.teachers) > 0
section.room = (section.prettyrooms() or [None])[0]
section.unique_resources = section.resourceassignments().order_by('assignment_group').distinct('assignment_group')
# section.teachers is a property, so we can't add extra
Expand Down

0 comments on commit de5861c

Please sign in to comment.