Browse Source

Correct attribute name

pull/2924/head
Manny Dinssa 2 months ago
parent
commit
543a65e153
  1. 2
      app/models/validations/sales/property_validations.rb

2
app/models/validations/sales/property_validations.rb

@ -40,7 +40,7 @@ module Validations::Sales::PropertyValidations
end end
def validate_la_in_england(record) def validate_la_in_england(record)
return unless record.form.start_year_2025_or_later? || (record.startdate_changed? && record.startdate_was.year == 2025 && record.startdate.year == 2024) return unless record.form.start_year_2025_or_later? || (record.saledate_changed? && record.saledate_was.year == 2025 && record.saledate.year == 2024)
return unless record.la return unless record.la
return if record.la.in?(LocalAuthority.england.pluck(:code)) return if record.la.in?(LocalAuthority.england.pluck(:code))

Loading…
Cancel
Save