Browse Source

CSV export, exclude address_search

CLDC-3787-Autocomplete-address-search
Manny Dinssa 4 days ago
parent
commit
d0df3be415
  1. 2
      app/services/csv/lettings_log_csv_service.rb
  2. 2
      app/services/csv/sales_log_csv_service.rb

2
app/services/csv/lettings_log_csv_service.rb

@ -258,7 +258,7 @@ module Csv
def lettings_log_attributes def lettings_log_attributes
ordered_questions = FormHandler.instance.ordered_questions_for_year(@year, "lettings") ordered_questions = FormHandler.instance.ordered_questions_for_year(@year, "lettings")
soft_validations_attributes = soft_validations_attributes(ordered_questions) soft_validations_attributes = soft_validations_attributes(ordered_questions)
ordered_questions.reject! { |q| q.id.match?(/age\d_known|nationality_all_group|rent_value_check/) } ordered_questions.reject! { |q| q.id.match?(/age\d_known|nationality_all_group|rent_value_check|address_search/) }
attributes = insert_derived_and_related_attributes(ordered_questions) attributes = insert_derived_and_related_attributes(ordered_questions)
order_address_fields_for_support(attributes) order_address_fields_for_support(attributes)
final_attributes = non_question_fields + attributes + SCHEME_AND_LOCATION_ATTRIBUTES final_attributes = non_question_fields + attributes + SCHEME_AND_LOCATION_ATTRIBUTES

2
app/services/csv/sales_log_csv_service.rb

@ -162,7 +162,7 @@ module Csv
def sales_log_attributes def sales_log_attributes
ordered_questions = FormHandler.instance.ordered_questions_for_year(@year, "sales") ordered_questions = FormHandler.instance.ordered_questions_for_year(@year, "sales")
ordered_questions.reject! { |q| q.id.match?(/((?<!la)_known)|(_check)|(_asked)|nationality_all_group|nationality_all_buyer2_group/) } ordered_questions.reject! { |q| q.id.match?(/((?<!la)_known)|(_check)|(_asked)|nationality_all_group|nationality_all_buyer2_group|address_search/) }
attributes = insert_derived_and_related_attributes(ordered_questions) attributes = insert_derived_and_related_attributes(ordered_questions)
order_address_fields_for_support(attributes) order_address_fields_for_support(attributes)
final_attributes = non_question_fields + attributes final_attributes = non_question_fields + attributes

Loading…
Cancel
Save