From e08dc01cd61d8c6440db5bf4c80b696554454320 Mon Sep 17 00:00:00 2001 From: Manny Dinssa <44172848+Dinssa@users.noreply.github.com> Date: Wed, 20 Nov 2024 18:45:59 +0000 Subject: [PATCH] Allow user to change the age of a person if they're not actually under 16 without being blocked --- app/models/derived_variables/sales_log_variables.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/models/derived_variables/sales_log_variables.rb b/app/models/derived_variables/sales_log_variables.rb index a1462454c..2f97bef1f 100644 --- a/app/models/derived_variables/sales_log_variables.rb +++ b/app/models/derived_variables/sales_log_variables.rb @@ -160,6 +160,8 @@ private (start_index..6).each do |idx| if age_under_16?(idx) self["ecstat#{idx}"] = 9 + elsif self["ecstat#{idx}"] == 9 + self["ecstat#{idx}"] = nil end end end