Fix for the location filter restriction

This variable appears to be set in the context only when `not selected_loc_id and location_id and domain.commtrack_enabled` evaluates to true. What happens here if `restriction` is not in context?