diff --git a/app/services/csv/lettings_log_csv_service.rb b/app/services/csv/lettings_log_csv_service.rb index 490b89416..8576eddb7 100644 --- a/app/services/csv/lettings_log_csv_service.rb +++ b/app/services/csv/lettings_log_csv_service.rb @@ -266,12 +266,10 @@ module Csv end def lettings_log_definitions - definitions = @user.variable_definitions.lettings definitions.group_by { |record| [record.variable, record.definition] } .map do |_, options| - exact_match = options.find { |definition| definition.year == @year && definition.user_type == @user.user_type } next exact_match if exact_match diff --git a/app/services/csv/sales_log_csv_service.rb b/app/services/csv/sales_log_csv_service.rb index 7f17d86cc..6580169e9 100644 --- a/app/services/csv/sales_log_csv_service.rb +++ b/app/services/csv/sales_log_csv_service.rb @@ -170,12 +170,10 @@ module Csv end def sales_log_definitions - definitions = @user.variable_definitions.sales definitions.group_by { |record| [record.variable, record.definition] } .map do |_, options| - exact_match = options.find { |definition| definition.year == @year && definition.user_type == @user.user_type } next exact_match if exact_match