def households_for_open_survey(interviewer): open_survey = Survey.currently_open_surveys(interviewer.location) households = interviewer.households.filter(survey__in=open_survey).all() return len([hs for hs in households if hs.get_head() is not None])
def households_for_open_survey(interviewer): open_survey = Survey.currently_open_surveys(interviewer.location) households = interviewer.households.filter(survey__in=open_survey).all() return len([hs for hs in households if hs.get_head() is not None])
def open_survey_in_current_loc(interviewer): return len(Survey.currently_open_surveys(interviewer.location))
def open_survey_in_current_loc(interviewer): return len(Survey.currently_open_surveys(interviewer.location))