Submit social housing lettings and sales data (CORE)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

7 lines
250 B

desc "Alter ppcodenk values for non imported lettings logs in the database"
task correct_ppcodenk_values: :environment do
LettingsLog.where.not(ppcodenk: nil).find_each do |log|
log.update_columns(ppcodenk: log.ppcodenk == 1 ? 0 : 1)
end
end