diff --git a/conditional/blueprints/spring_evals.py b/conditional/blueprints/spring_evals.py index eb0eabe5..620a7164 100644 --- a/conditional/blueprints/spring_evals.py +++ b/conditional/blueprints/spring_evals.py @@ -49,7 +49,7 @@ def display_spring_evals(internal=False): eval_data = None - h_meetings = [m.meeting_id for m in get_hm(account)] + h_meetings = [m.meeting_id for m in get_hm(account, only_absent=True)] member = { 'name': account.cn, 'uid': uid, diff --git a/conditional/util/member.py b/conditional/util/member.py index 23f7e61c..767ce8cb 100644 --- a/conditional/util/member.py +++ b/conditional/util/member.py @@ -128,7 +128,7 @@ def get_cm(member): return c_meetings -def get_hm(member): +def get_hm(member, only_absent=False): h_meetings = MemberHouseMeetingAttendance.query.outerjoin( HouseMeeting, MemberHouseMeetingAttendance.meeting_id == HouseMeeting.id).with_entities( @@ -137,4 +137,6 @@ def get_hm(member): HouseMeeting.date).filter( HouseMeeting.date > start_of_year(), MemberHouseMeetingAttendance.uid == member.uid) + if only_absent: + h_meetings = h_meetings.filter(MemberHouseMeetingAttendance.attendance_status == "Absent") return h_meetings