From dc3dd1650e90dfc1d842624dec02e762d1039446 Mon Sep 17 00:00:00 2001 From: Karina Date: Thu, 7 May 2026 12:22:20 -0400 Subject: [PATCH] Removed labor meetings from participation history --- app/logic/events.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/logic/events.py b/app/logic/events.py index 09b3e286f..8a26f58fd 100644 --- a/app/logic/events.py +++ b/app/logic/events.py @@ -398,6 +398,10 @@ def getParticipatedEventsForUser(user): Used in testing, defaults to the current timestamp. :return: A list of Event objects """ + + eventName = fn.LOWER(Event.name) + checkIfLaborMeeting = eventName.contains("labor meeting") + participatedEvents = (Event.select(Event, Program.programName, Case(None, ( ((Event.isLaborOnly | Event.name.contains("Labor")) & Event.isService, "Labor & Volunteer"), ((Event.isLaborOnly | Event.name.contains("Labor")), "Labor"), @@ -405,7 +409,7 @@ def getParticipatedEventsForUser(user): .join(Program, JOIN.LEFT_OUTER).switch() .join(EventParticipant) .where(EventParticipant.user == user, - Event.isAllVolunteerTraining == False, Event.deletionDate == None) + Event.isAllVolunteerTraining == False, Event.deletionDate == None, ~checkIfLaborMeeting) .order_by(Event.startDate, Event.name)) allVolunteer = (Event.select(Event, "", Value("Volunteer").alias("participatedType")) .join(EventParticipant)