Browse Source

CLDC-4250: Add a post release script

CLDC-4250-new-universal-credit-validation
samyou-softwire 4 days ago
parent
commit
6f63b6b2fb
  1. 10
      lib/tasks/update_logs_with_invalid_hb_benefits_2026.rake

10
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
Loading…
Cancel
Save