From b9ed4a564ffe31a9c2f99004a0c05db5001625d1 Mon Sep 17 00:00:00 2001 From: Arthur Campbell Date: Mon, 17 Jul 2023 16:14:23 +0100 Subject: [PATCH] revert updating creation method in rake task with update all --- lib/tasks/creation_method.rake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tasks/creation_method.rake b/lib/tasks/creation_method.rake index 4f3f46539..1802d1b29 100644 --- a/lib/tasks/creation_method.rake +++ b/lib/tasks/creation_method.rake @@ -1,5 +1,5 @@ desc "set creation method to bulk upload if a log has a bulk upload id" task set_creation_method: :environment do - LettingsLog.where.not(bulk_upload_id: nil).find_each(&:creation_method_bulk_upload!) - SalesLog.where.not(bulk_upload_id: nil).find_each(&:creation_method_bulk_upload!) + LettingsLog.where.not(bulk_upload_id: nil).update_all(creation_method: 2) + SalesLog.where.not(bulk_upload_id: nil).update_all(creation_method: 2) end