def get_field_values_list(self, d):
        """
        Iterate over a (possibly nested) dict, and return a list
        of all children queries, as a dict of the following structure:
        {
            'field': 'some_field__iexact',
            'value': 'some_value',
            'value_from': 'optional_range_val1',
            'value_to': 'optional_range_val2',
            'negate': True,
        }

        OR relations are expressed as an extra "line" between queries.
        """
        fields = []
        children = d.get('children', [])
        for child in children:
            if isinstance(child, dict):
                fields.extend(self.get_field_values_list(child))
            else:
                f = {'field': child[0], 'value': child[1]}
                if self._is_range(child):
                    f['value_from'] = child[1][0]
                    f['value_to'] = child[1][1]
                f['negate'] = d.get('negated', False)
                fields.append(f)

            # add _OR line
            if d['connector'] == 'OR' and children[-1] != child:
                fields.append({'field': '_OR', 'value': 'null'})
        return fields