diff --git a/app/models/derived_variables/case_log_variables.rb b/app/models/derived_variables/case_log_variables.rb index 5a638fba2..c12e14e46 100644 --- a/app/models/derived_variables/case_log_variables.rb +++ b/app/models/derived_variables/case_log_variables.rb @@ -8,7 +8,8 @@ module DerivedVariables::CaseLogVariables def scheme_has_multiple_locations? return false unless scheme - scheme.locations.size > 1 + @scheme_locations_count ||= scheme.locations.size + @scheme_locations_count > 1 end def set_derived_fields!