diff --git a/models/cfp.py b/models/cfp.py index bb4086ef8..d0960d2a4 100644 --- a/models/cfp.py +++ b/models/cfp.py @@ -737,15 +737,17 @@ def overlaps_with(self, other) -> bool: return self.end_date > other.start_date and other.end_date > self.start_date def get_conflicting_content(self) -> list["Proposal"]: - # I gave up trying to do this as SQL via SQLAlchemy's filter expressions. + # This is intended for attendee content that must have a scheduled time and duration return [ p for p in Proposal.query.filter( Proposal.id != self.id, Proposal.scheduled_venue_id == self.scheduled_venue_id, Proposal.scheduled_time >= self.start_date, + Proposal.scheduled_duration != None, ).all() - if p.overlaps_with(self) + if p.scheduled_time > self.scheduled_time + self.scheduled_duration and + p.scheduled_time + p.scheduled_duration > self.scheduled_time ] @property diff --git a/templates/admin/_nav.html b/templates/admin/_nav.html index fe0033003..7c5c1d58e 100644 --- a/templates/admin/_nav.html +++ b/templates/admin/_nav.html @@ -70,7 +70,6 @@