From 8e21c1dc25247fe839b56e14bdb891f54e15baa0 Mon Sep 17 00:00:00 2001 From: Daniel Illi Date: Fri, 22 Nov 2024 13:53:26 +0100 Subject: [PATCH] Rubocop fixes, remove duplicate migration --- app/domain/sac_imports/csv_report.rb | 2 +- app/domain/sac_imports/csv_source/nav2.rb | 2 +- db/migrate/20241104211910_add_family_id_to_roles.rb | 5 ----- 3 files changed, 2 insertions(+), 7 deletions(-) delete mode 100644 db/migrate/20241104211910_add_family_id_to_roles.rb diff --git a/app/domain/sac_imports/csv_report.rb b/app/domain/sac_imports/csv_report.rb index fabb5bc12..2ea8026f6 100644 --- a/app/domain/sac_imports/csv_report.rb +++ b/app/domain/sac_imports/csv_report.rb @@ -31,7 +31,7 @@ def add_row(row) end def log(line) - puts(line) + @output.puts(line) File.write(log_file_path, "#{line}\n", mode: "a") end diff --git a/app/domain/sac_imports/csv_source/nav2.rb b/app/domain/sac_imports/csv_source/nav2.rb index b263f6f8c..af71273be 100644 --- a/app/domain/sac_imports/csv_source/nav2.rb +++ b/app/domain/sac_imports/csv_source/nav2.rb @@ -45,7 +45,7 @@ def active? def terminated? return false if valid_until.blank? - REFERENCE_DATE > Date.parse(valid_until) + Date.parse(valid_until) < REFERENCE_DATE end end end diff --git a/db/migrate/20241104211910_add_family_id_to_roles.rb b/db/migrate/20241104211910_add_family_id_to_roles.rb deleted file mode 100644 index 5b6566ad9..000000000 --- a/db/migrate/20241104211910_add_family_id_to_roles.rb +++ /dev/null @@ -1,5 +0,0 @@ -class AddFamilyIdToRoles < ActiveRecord::Migration[6.1] - def change - add_column :roles, :family_id, :string - end -end