From f9a97764c886a27a6828c403d56d50a8a7dda0fb Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Tue, 20 Jun 2023 23:37:47 +0000 Subject: [PATCH] Don't send reminders for partial events or outings --- apiserver/apiserver/api/management/commands/run_hourly.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apiserver/apiserver/api/management/commands/run_hourly.py b/apiserver/apiserver/api/management/commands/run_hourly.py index 4778375..e7cd9e6 100644 --- a/apiserver/apiserver/api/management/commands/run_hourly.py +++ b/apiserver/apiserver/api/management/commands/run_hourly.py @@ -75,8 +75,8 @@ class Command(BaseCommand): self.stdout.write(' Is members meeting or cleanup, skipping.') continue - if session.course.tags in ['Event', 'Outing']: - self.stdout.write(' Is only outing or event, skipping.') + if 'Event' in session.course.tags or 'Outing' in session.course.tags: + self.stdout.write(' Is partially outing or event, skipping.') continue self.stdout.write(' Emailing {} {}:'.format(session.instructor.username, session.instructor.email)) @@ -134,8 +134,8 @@ class Command(BaseCommand): self.stdout.write(' Is members meeting or cleanup, skipping.') continue - if session.course.tags in ['Event', 'Outing']: - self.stdout.write(' Is only outing or event, skipping.') + if 'Event' in session.course.tags or 'Outing' in session.course.tags: + self.stdout.write(' Is partially outing or event, skipping.') continue if session.students.count() == 0: