diff --git a/app/models/lettings_log.rb b/app/models/lettings_log.rb index aa854f420..142c48e52 100644 --- a/app/models/lettings_log.rb +++ b/app/models/lettings_log.rb @@ -465,14 +465,6 @@ class LettingsLog < ApplicationRecord location&.id end - def la_label - la - end - - def prevloc_label - prevloc - end - def self.to_csv(user = nil) Csv::LettingsLogCsvService.new(user).to_csv end diff --git a/app/services/csv/lettings_log_csv_service.rb b/app/services/csv/lettings_log_csv_service.rb index 35d8fb53e..6070e91c2 100644 --- a/app/services/csv/lettings_log_csv_service.rb +++ b/app/services/csv/lettings_log_csv_service.rb @@ -16,7 +16,7 @@ module Csv if %w[la prevloc].include? att label_from_value(record.send(att)) elsif %w[la_label prevloc_label].include? att - record.form.get_question(att.remove("_label"), record)&.label_from_value(record.send(att)) || label_from_value(record.send(att)) + record.form.get_question(att.remove("_label"), record)&.label_from_value(record.send(att.remove("_label"))) || label_from_value(record.send(att.remove("_label"))) else record.form.get_question(att, record)&.label_from_value(record.send(att)) || label_from_value(record.send(att)) end