From 7082fe096934d5854bd4981b9196974885d13a53 Mon Sep 17 00:00:00 2001 From: natdeanlewissoftwire Date: Thu, 21 Mar 2024 11:07:14 +0000 Subject: [PATCH] feat: validate nulls last in bu --- app/services/bulk_upload/lettings/year2024/row_parser.rb | 4 ++-- app/services/bulk_upload/sales/year2024/row_parser.rb | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/services/bulk_upload/lettings/year2024/row_parser.rb b/app/services/bulk_upload/lettings/year2024/row_parser.rb index b0802df12..1c8076263 100644 --- a/app/services/bulk_upload/lettings/year2024/row_parser.rb +++ b/app/services/bulk_upload/lettings/year2024/row_parser.rb @@ -411,13 +411,13 @@ class BulkUpload::Lettings::Year2024::RowParser validate :validate_all_charges_given, on: :after_log, if: proc { is_carehome.zero? } validate :validate_address_option_found, on: :after_log - validate :validate_nulls, on: :after_log - validate :validate_uprn_exists_if_any_key_address_fields_are_blank, on: :after_log, unless: -> { supported_housing? } validate :validate_incomplete_soft_validations, on: :after_log validate :validate_nationality, on: :after_log + validate :validate_nulls, on: :after_log + def self.question_for_field(field) QUESTIONS[field] end diff --git a/app/services/bulk_upload/sales/year2024/row_parser.rb b/app/services/bulk_upload/sales/year2024/row_parser.rb index be6a9ca63..0dc00be36 100644 --- a/app/services/bulk_upload/sales/year2024/row_parser.rb +++ b/app/services/bulk_upload/sales/year2024/row_parser.rb @@ -453,7 +453,6 @@ class BulkUpload::Sales::Year2024::RowParser validate :validate_buyer1_economic_status, on: :before_log validate :validate_address_option_found, on: :after_log validate :validate_buyer2_economic_status, on: :before_log - validate :validate_nulls, on: :after_log validate :validate_valid_radio_option, on: :before_log validate :validate_owning_org_data_given, on: :after_log @@ -474,6 +473,8 @@ class BulkUpload::Sales::Year2024::RowParser validate :validate_nationality, on: :after_log validate :validate_buyer_2_nationality, on: :after_log + validate :validate_nulls, on: :after_log + def self.question_for_field(field) QUESTIONS[field] end