Fix #58 by including date filter on has_alerts query