From 260d8e4378c2a19e071826997744c12cc7a66daa Mon Sep 17 00:00:00 2001 From: Jack S Date: Tue, 22 Nov 2022 10:44:33 +0000 Subject: [PATCH] Bugfix provider_type on nil --- app/models/derived_variables/lettings_log_variables.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/derived_variables/lettings_log_variables.rb b/app/models/derived_variables/lettings_log_variables.rb index c76d5c2d9..1b1817ec3 100644 --- a/app/models/derived_variables/lettings_log_variables.rb +++ b/app/models/derived_variables/lettings_log_variables.rb @@ -49,8 +49,8 @@ module DerivedVariables::LettingsLogVariables self.waityear = 2 if is_general_needs? # fixed term - self.prevten = 32 if managing_organisation.provider_type == "PRP" - self.prevten = 30 if managing_organisation.provider_type == "LA" + self.prevten = 32 if managing_organisation&.provider_type == "PRP" + self.prevten = 30 if managing_organisation&.provider_type == "LA" end end