Browse Source

Clean up lettings log property overrides

CLDC-4159-address-uprn-for-supported-housing
oscar-richardson-softwire 5 days ago
parent
commit
5a2257272d
  1. 18
      app/models/lettings_log.rb

18
app/models/lettings_log.rb

@ -184,19 +184,17 @@ class LettingsLog < Log
end end
def la def la
if location && (!form.start_year_2026_or_later? || (form.start_year_2026_or_later? && !super)) return super unless location
location.linked_local_authorities.active(form.start_date).first&.code || location.location_code return super if form.start_year_2026_or_later? && super
else
super location.linked_local_authorities.active(form.start_date).first&.code || location.location_code
end
end end
def postcode_full def postcode_full
if location && (!form.start_year_2026_or_later? || (form.start_year_2026_or_later? && !super)) return super unless location
location.postcode return super if form.start_year_2026_or_later? && super
else
super location.postcode
end
end end
def postcode_full=(postcode) def postcode_full=(postcode)

Loading…
Cancel
Save