Allow reservations to be like: A.ends_at == B.starts_at
@@ -109,8 +109,8 @@ class Reservation(CRUDModel, Base):
return Reservation.query.filter(
# Two events overlap in time domain
and_(
- self.starts_at <= Reservation.ends_at,
- self.ends_at >= Reservation.starts_at
+ self.starts_at < Reservation.ends_at,
+ self.ends_at > Reservation.starts_at
),
# Case concerns the same resource
Reservation.protected_resource_id == self.protected_resource_id
