From 1327c21e74b722890c02ef8f89509c449532e9eb Mon Sep 17 00:00:00 2001 From: Thomas Steen Rasmussen Date: Tue, 4 Aug 2020 22:37:35 +0200 Subject: [PATCH] assume a speaker is always available if they submitted no availability at all --- src/program/models.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/program/models.py b/src/program/models.py index 3b16063a..3ca5fb4d 100644 --- a/src/program/models.py +++ b/src/program/models.py @@ -1558,7 +1558,12 @@ class Speaker(CampRelatedModel): def is_available(self, when, ignore_event_slot_ids=[]): """ A speaker is available if the person has positive availability for the period and - if the speaker is not in another event at the time """ + if the speaker is not in another event at the time, or if the person has not submitted + any availability at all """ + if not self.availabilities.exists(): + # we have no availability at all for this speaker, assume they are available + return True + if not self.availabilities.filter(when__contains=when, available=True).exists(): # we have no positive availability for this speaker return False