Skip to content

Commit 371c4bb

Browse files
committed
Fix computing meeting updated timestamp when there's either a timeslot
or a session but not both - Legacy-Id: 6855
1 parent 3053bef commit 371c4bb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ietf/meeting/helpers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ def get_schedule_by_id(meeting, schedid):
134134
return schedule
135135

136136
def meeting_updated(meeting):
137-
ts = max(meeting.timeslot_set.aggregate(Max('modified'))["modified__max"],
138-
meeting.session_set.aggregate(Max('modified'))["modified__max"])
137+
ts = max(meeting.timeslot_set.aggregate(Max('modified'))["modified__max"] or datetime.datetime.min,
138+
meeting.session_set.aggregate(Max('modified'))["modified__max"] or datetime.datetime.min)
139139
tz = pytz.timezone(settings.PRODUCTION_TIMEZONE)
140140
ts = tz.localize(ts)
141141
return ts

0 commit comments

Comments
 (0)