diff --git a/lib/tasks/update_logs_with_invalid_hb_benefits_2026.rake b/lib/tasks/update_logs_with_invalid_hb_benefits_2026.rake new file mode 100644 index 000000000..4770db96a --- /dev/null +++ b/lib/tasks/update_logs_with_invalid_hb_benefits_2026.rake @@ -0,0 +1,10 @@ +desc "For logs that fail the validate_housing_universal_credit_matches_income_proportion check created before we released it, clear the answer to the question" +task update_logs_with_invalid_hb_benefits_2026: :environment do + impacted_logs = LettingsLog.filter_by_year(2026).where(hb: 6, benefits: 3) + + puts "#{impacted_logs.count} logs will be updated #{impacted_logs.map(&:id)}" + + impacted_logs.update!(benefits: nil, hb: nil) + + puts "Done" +end