Fix member meeting date suggestion bug

This commit is contained in:
Tanner Collin 2022-07-22 03:26:52 +00:00
parent 983c470705
commit be1157b310

View File

@ -572,7 +572,8 @@ class CourseDetailSerializer(serializers.ModelSerializer):
cost = 0 cost = 0
max_students = None max_students = None
elif obj.id == 317: # members' meeting 7:00 PM 3rd Thursday of odd months, Wednesday of even months elif obj.id == 317: # members' meeting 7:00 PM 3rd Thursday of odd months, Wednesday of even months
if utils.today_alberta_tz().month % 2 == 0: next_month = next_date(calendar.WEDNESDAY, week_num=3).month
if next_month % 2 == 0:
date = next_date(calendar.WEDNESDAY, week_num=3) date = next_date(calendar.WEDNESDAY, week_num=3)
else: else:
date = next_date(calendar.THURSDAY, week_num=3) date = next_date(calendar.THURSDAY, week_num=3)