Browse Source

Clean up lettings log property overrides

CLDC-4159-address-uprn-for-supported-housing
oscar-richardson-softwire 3 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
def la
if location && (!form.start_year_2026_or_later? || (form.start_year_2026_or_later? && !super))
location.linked_local_authorities.active(form.start_date).first&.code || location.location_code
else
super
end
return super unless location
return super if form.start_year_2026_or_later? && super
location.linked_local_authorities.active(form.start_date).first&.code || location.location_code
end
def postcode_full
if location && (!form.start_year_2026_or_later? || (form.start_year_2026_or_later? && !super))
location.postcode
else
super
end
return super unless location
return super if form.start_year_2026_or_later? && super
location.postcode
end
def postcode_full=(postcode)

Loading…
Cancel
Save