def domains_with_practices(self): practices = self.config.get('practices') domains = self.config.get('domains') return [{ 'text': element.text, 'practices': [ practice for practice in element.next if not practices or practices[0] == '0' or practice.val in practices ] } for element in get_domains_with_next( self.domain, value_chain=self.config['value_chain']) if not domains or domains[0] == '0' or element.val in domains]
def domains_with_practices(self): practices = self.config.get('practices') domains = self.config.get('domains') return [ { 'text': element.text, 'practices': [ practice for practice in element.next if not practices or practices[0] == '0' or practice.val in practices ] } for element in get_domains_with_next(self.domain, value_chain=self.config['value_chain']) if not domains or domains[0] == '0' or element.val in domains ]