Browse Source

CLDC-4141: cleanup export field filtering

pull/3156/head
Nat Dean-Lewis 2 weeks ago
parent
commit
0c67bc70f0
  1. 1
      app/services/exports/lettings_log_export_constants.rb
  2. 1
      app/services/exports/lettings_log_export_service.rb

1
app/services/exports/lettings_log_export_constants.rb

@ -161,6 +161,7 @@ module Exports::LettingsLogExportConstants
EXPORT_FIELDS << "age#{index}" EXPORT_FIELDS << "age#{index}"
EXPORT_FIELDS << "ecstat#{index}" EXPORT_FIELDS << "ecstat#{index}"
EXPORT_FIELDS << "sex#{index}" EXPORT_FIELDS << "sex#{index}"
EXPORT_FIELDS << "sexrab#{index}"
end end
(2..8).each do |index| (2..8).each do |index|
EXPORT_FIELDS << "relat#{index}" EXPORT_FIELDS << "relat#{index}"

1
app/services/exports/lettings_log_export_service.rb

@ -172,7 +172,6 @@ module Exports
details_known_prefix = "details_known_" details_known_prefix = "details_known_"
included_fields = Set[] included_fields = Set[]
included_fields.merge(EXPORT_FIELDS) included_fields.merge(EXPORT_FIELDS)
included_fields.merge(POST_2026_EXPORT_FIELDS)
if lettings_log.form.start_year_2024_or_later? if lettings_log.form.start_year_2024_or_later?
included_fields.subtract(PRE_2024_EXPORT_FIELDS) included_fields.subtract(PRE_2024_EXPORT_FIELDS)

Loading…
Cancel
Save