From c6d5ade30b0693b2d29f53177f80120544d731c6 Mon Sep 17 00:00:00 2001 From: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Date: Tue, 11 Jun 2024 15:29:53 +0100 Subject: [PATCH] Fix logger (#2457) --- lib/tasks/recalculate_vacdays.rake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tasks/recalculate_vacdays.rake b/lib/tasks/recalculate_vacdays.rake index c83f58870..62acdbc76 100644 --- a/lib/tasks/recalculate_vacdays.rake +++ b/lib/tasks/recalculate_vacdays.rake @@ -1,14 +1,14 @@ desc "Recalculate vacdays after bugfix for daylight savings time changes" task recalculate_vacdays: :environment do LettingsLog.where.not(vacdays: nil).find_each do |log| - Rails.logger.log("Log #{log.id}") + Rails.logger.info("Log #{log.id}") recalculated_vacdays = log.send(:property_vacant_days) next if recalculated_vacdays == log.vacdays log.vacdays = recalculated_vacdays next if log.save - Rails.logger.log("Log #{log.id} could not be saved, saving updated vacdays without validation") + Rails.logger.info("Log #{log.id} could not be saved, saving updated vacdays without validation") log.reload log.vacdays = recalculated_vacdays log.save!(validate: false)