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