From 949300780152af8689d61c74b9373b9c39cef20f Mon Sep 17 00:00:00 2001 From: rebuilt Date: Mon, 12 Jun 2023 15:52:57 -0700 Subject: [PATCH] Also delete race scores when deleting non-lowell info --- lib/tasks/data.rake | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/tasks/data.rake b/lib/tasks/data.rake index 4bef0f12..0d060c24 100644 --- a/lib/tasks/data.rake +++ b/lib/tasks/data.rake @@ -79,6 +79,7 @@ namespace :data do task delete_non_lowell: :environment do schools = School.all.reject { |s| s.district.name == 'Lowell' } ResponseRate.where(school: schools).delete_all + RaceScore.where(school: schools).delete_all Respondent.where(school: schools).delete_all schools.each { |school| school.delete } districts = District.all.reject { |district| district.name == 'Lowell' }