From ea13d9e321fecb2f9347577453f10926cf7f8a83 Mon Sep 17 00:00:00 2001 From: Rachael Booth Date: Fri, 19 Jan 2024 15:41:01 +0000 Subject: [PATCH] Allow any number of digits --- app/services/bulk_upload/sales/year2023/row_parser.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/services/bulk_upload/sales/year2023/row_parser.rb b/app/services/bulk_upload/sales/year2023/row_parser.rb index b2f263513..bb3290d2f 100644 --- a/app/services/bulk_upload/sales/year2023/row_parser.rb +++ b/app/services/bulk_upload/sales/year2023/row_parser.rb @@ -842,16 +842,16 @@ private attributes["national"] = field_33 attributes["income1nk"] = field_78 == "R" ? 1 : 0 - attributes["income1"] = field_78.to_i if attributes["income1nk"]&.zero? && field_78&.match(/\A\d{1,5}\z/) + attributes["income1"] = field_78.to_i if attributes["income1nk"]&.zero? && field_78&.match(/\A\d+\z/) attributes["income2nk"] = field_80 == "R" ? 1 : 0 - attributes["income2"] = field_80.to_i if attributes["income2nk"]&.zero? && field_80&.match(/\A\d{1,5}\z/) + attributes["income2"] = field_80.to_i if attributes["income2nk"]&.zero? && field_80&.match(/\A\d+\z/) attributes["inc1mort"] = field_79 attributes["inc2mort"] = field_81 attributes["savingsnk"] = field_83 == "R" ? 1 : 0 - attributes["savings"] = field_83.to_i if attributes["savingsnk"]&.zero? && field_83&.match(/\A\d{1,6}\z/) + attributes["savings"] = field_83.to_i if attributes["savingsnk"]&.zero? && field_83&.match(/\A\d+\z/) attributes["prevown"] = field_84 attributes["prevten"] = field_62