

def base_filters(self):
    block = self.request_params.get('block', '')
    individual = self.request_params.get('individual', '')
    filters = []
    if block:
        filters.append({
            'term': {
                'block.#value': block,
            },
        })
    if individual:
        filters.append({
            'term': {
                'owner_id': individual,
            },
        })
    return filters

dataset/ETHPy150Open dimagi/commcare-hq/custom/apps/crs_reports/reports.py BaseHNBCReport.base_filters/original