human
Solve the following python programming problem given the following code:
def build_es_query(self, case_type = None, afilter = None, status = None) : 
    def _domain_term() : 
        return { 
            'term' : { 
                'domain.exact' : self.domain, 
}, 
} 
subterms = ([_domain_term (), afilter] if afilter else [_domain_term ()]) 
    if case_type : 
        subterms.append ({ 
            'term' : { 
                'type.exact' : self, 
}, 
}) 
if status : 
        subterms.append ({ 
            'term' : { 
                'closed' : (status == 'closed'), 
}, 
}) 
es_query = { 
        'query' : { 
            'filtered' : { 
                'query' : { 
                    'match_all' : { 
                        
}, 
}, 
                'filter' : { 
                    'and' : subterms, 
}, 
}, 
}, 
        'sort' : self.get_sorting_block (), 
        'from' : self.pagination.start, 
        'size' : self.pagination.count, 
} 
    return es_query 

    
    

    Fix the buggy line: 'type.exact' : self ,
assistant
#Here is Python code to fix the buggy line: 'type.

'type.exact' : case_type ,