Browse Source

Null safe

pull/578/head
baarkerlounger 3 years ago
parent
commit
3d05d02c6c
  1. 3
      app/models/case_log.rb

3
app/models/case_log.rb

@ -192,10 +192,13 @@ class CaseLog < ApplicationRecord
end
def is_secure_tenancy?
return unless collection_start_year
# 1: Secure (including flexible)
if collection_start_year < 2022
tenancy == 1
else
# 6: Secure - fixed term, 7: Secure - lifetime
[6, 7].include?(tenancy)
end
end

Loading…
Cancel
Save