Browse Source

Reorganise includes in invalid_logs.rake

pull/3061/head
Manny Dinssa 1 week ago
parent
commit
5fec991eab
  1. 9
      lib/tasks/invalid_logs.rake

9
lib/tasks/invalid_logs.rake

@ -1,9 +1,9 @@
namespace :logs do
include CollectionTimeHelper
include InvalidLogsHelper
desc "Count the number of invalid LettingsLog and SalesLog for a given year"
task :count_invalid, [:year] => :environment do |_task, args|
include CollectionTimeHelper
include InvalidLogsHelper
year = args[:year] || current_collection_year
count_and_display_invalid_logs(LettingsLog, "LettingsLog", year)
count_and_display_invalid_logs(SalesLog, "SalesLog", year)
@ -11,6 +11,9 @@ namespace :logs do
desc "Surface all invalid logs and output their error messages for a given year"
task :surface_invalid, [:year] => :environment do |_task, args|
include CollectionTimeHelper
include InvalidLogsHelper
year = args[:year] || current_collection_year
surface_invalid_logs(LettingsLog, "LettingsLog", year)
surface_invalid_logs(SalesLog, "SalesLog", year)

Loading…
Cancel
Save