Browse Source

Indentation

pull/484/head
baarkerlounger 3 years ago
parent
commit
6f985f3b1d
  1. 8
      app/models/validations/local_authority_validations.rb

8
app/models/validations/local_authority_validations.rb

@ -22,10 +22,10 @@ module Validations::LocalAuthorityValidations
end end
if record.owning_organisation && record.owning_organisation.local_authorities.present? && if record.owning_organisation && record.owning_organisation.local_authorities.present? &&
record.la && !record.owning_organisation.local_authorities.include?(record.la) record.la && !record.owning_organisation.local_authorities.include?(record.la)
la_name = record.form.get_question("la", record).label_from_value(record.la) la_name = record.form.get_question("la", record).label_from_value(record.la)
org_name = record.owning_organisation.name org_name = record.owning_organisation.name
record.errors.add :la, I18n.t("validations.property.la.la_invalid_for_org", org_name:, la_name:) record.errors.add :la, I18n.t("validations.property.la.la_invalid_for_org", org_name:, la_name:)
end end
end end

Loading…
Cancel
Save