diff --git a/backend/routers/project_locations.py b/backend/routers/project_locations.py index 02003d6..7059192 100644 --- a/backend/routers/project_locations.py +++ b/backend/routers/project_locations.py @@ -874,8 +874,8 @@ async def delete_assignment( and_( MonitoringSession.location_id == assignment.location_id, MonitoringSession.unit_id == assignment.unit_id, - MonitoringSession.start_time >= window_start, - MonitoringSession.start_time <= window_end, + MonitoringSession.started_at >= window_start, + MonitoringSession.started_at <= window_end, ) ).count()