From 19d7e7f984d933f7edaa2857fc2cdeebdaf958d5 Mon Sep 17 00:00:00 2001 From: baarkerlounger Date: Fri, 22 Apr 2022 15:59:28 +0100 Subject: [PATCH] Postcode may not be set --- app/models/validations/local_authority_validations.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/validations/local_authority_validations.rb b/app/models/validations/local_authority_validations.rb index ae38d5b25..e02394fe9 100644 --- a/app/models/validations/local_authority_validations.rb +++ b/app/models/validations/local_authority_validations.rb @@ -18,7 +18,7 @@ module Validations::LocalAuthorityValidations record.la && !record.owning_organisation.local_authorities.include?(record.la) la_name = record.form.get_question("la", record).label_from_value(record.la) org_name = record.owning_organisation.name - postcode = UKPostcode.parse(record.postcode_full) + postcode = UKPostcode.parse(record.postcode_full) if record.postcode_full record.errors.add :la, I18n.t("validations.property.la.la_invalid_for_org", org_name:, la_name:) record.errors.add :postcode_known, I18n.t("validations.property.la.postcode_invalid_for_org", org_name:, postcode:) end