Browse Source

Rename method

pull/1875/head
Kat 3 years ago
parent
commit
55c646b967
  1. 4
      app/services/exports/lettings_log_export_service.rb

4
app/services/exports/lettings_log_export_service.rb

@ -14,7 +14,7 @@ module Exports
archives_for_manifest = {} archives_for_manifest = {}
base_number = LogsExport.where(empty_export: false).maximum(:base_number) || 1 base_number = LogsExport.where(empty_export: false).maximum(:base_number) || 1
recent_export = LogsExport.order("started_at").last recent_export = LogsExport.order("started_at").last
available_collection_years(collection_year).each do |collection| collection_years_to_export(collection_year).each do |collection|
export = build_export_run(collection, start_time, base_number, full_update) export = build_export_run(collection, start_time, base_number, full_update)
archives = write_export_archive(export, collection, start_time, recent_export, full_update) archives = write_export_archive(export, collection, start_time, recent_export, full_update)
@ -267,7 +267,7 @@ module Exports
xml_doc_to_temp_file(doc) xml_doc_to_temp_file(doc)
end end
def available_collection_years(collection_year) def collection_years_to_export(collection_year)
return [collection_year] if collection_year.present? return [collection_year] if collection_year.present?
FormHandler.instance.lettings_forms.values.map { |f| f.start_date.year }.uniq FormHandler.instance.lettings_forms.values.map { |f| f.start_date.year }.uniq

Loading…
Cancel
Save