From 37d843915f4abd4b1668daf3dcd30c8d97300be1 Mon Sep 17 00:00:00 2001 From: Sam Seed Date: Thu, 5 Jan 2023 09:41:41 +0000 Subject: [PATCH] fix: define log and current_user instance vars in label_from_value (housing prov.) --- app/models/form/lettings/questions/stock_owner.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/models/form/lettings/questions/stock_owner.rb b/app/models/form/lettings/questions/stock_owner.rb index 67e747c1d..e2d2a633d 100644 --- a/app/models/form/lettings/questions/stock_owner.rb +++ b/app/models/form/lettings/questions/stock_owner.rb @@ -34,7 +34,10 @@ class Form::Lettings::Questions::StockOwner < ::Form::Question answer_options end - def label_from_value(value, _log = nil, _user = nil) + def label_from_value(value, log = nil, user = nil) + @log = log + @current_user = user + return unless value answer_options[value]