From 0abbe424b619b44d5445ed9917d346cf59fa47c0 Mon Sep 17 00:00:00 2001 From: Nat Dean-Lewis Date: Thu, 12 Feb 2026 12:17:07 +0000 Subject: [PATCH] CLDC-4141: reformat complex condition for readability --- app/services/csv/lettings_log_csv_service.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/services/csv/lettings_log_csv_service.rb b/app/services/csv/lettings_log_csv_service.rb index 7453929d5..214b7c050 100644 --- a/app/services/csv/lettings_log_csv_service.rb +++ b/app/services/csv/lettings_log_csv_service.rb @@ -359,7 +359,11 @@ module Csv log.public_send(attribute)&.iso8601 elsif USER_DATE_FIELDS.include? attribute log.public_send(attribute)&.strftime("%F") - elsif PERSON_DETAILS.any? { |key, _value| key == attribute } && (person_details_not_known?(log, attribute) || age_not_known?(log, attribute) || value == PERSON_DETAILS.find { |key, _value| key == attribute }[1]["refused_code"]) + elsif PERSON_DETAILS.any? { |key, _value| key == attribute } && + ( + person_details_not_known?(log, attribute) || age_not_known?(log, attribute) || + value == PERSON_DETAILS.find { |key, _value| key == attribute }[1]["refused_code"] + ) case @export_type when "codes" PERSON_DETAILS.find { |key, _value| key == attribute }[1]["refused_code"]