Browse Source

fixup! CLDC-4145: Derive is partner for under 16s

lint
CLDC-4159-address-uprn-for-supported-housing
Samuel Young 1 week ago
parent
commit
d8b53bb2de
  1. 4
      app/models/derived_variables/lettings_log_variables.rb

4
app/models/derived_variables/lettings_log_variables.rb

@ -276,14 +276,14 @@ private
def clear_child_constraints_for_age_changes!
(2..8).each do |idx|
if public_send("age#{idx}_changed?")
next unless public_send("age#{idx}_changed?")
self["ecstat#{idx}"] = nil if self["ecstat#{idx}"] == 9
# since the user can also input 'No' for relat there are cases when we don't want to clear this (changing age from 50 to 55 for example)
# note if age is changed from 10 to 15 we will clear it but the inference will set it back immediately after, see child_under_16_constraints!
self["relat#{idx}"] = nil if self["relat#{idx}"] == "X" && age_changed_from_below_16(idx) && form.start_year_2026_or_later?
end
end
end
def household_type
return unless totelder && totadult && totchild

Loading…
Cancel
Save