<commit_before>from django.db import connection
from collections import OrderedDict
import json
import re
from django.db.models import Q
from django.db.models.sql import Query
from django.db import DEFAULT_DB_ALIAS

def run_reports(question, **kwargs):
    return [run_report(question, report, **kwargs) for report in get_reports(question)]

def run_report(question, report, **kwargs):
    output = report.copy()
    output['question_id'] = question.id
    query = build_query(question, report['spec'], **kwargs)
    cursor = connection.cursor()<commit_msg>fix filtering<commit_after>from django.db import connection
from collections import OrderedDict
import json
import re
from django.db.models import Q
from django.db.models.sql import Query
from django.db import DEFAULT_DB_ALIAS
from website.models import Jurisdiction

def run_reports(question, **kwargs):
    return [run_report(question, report, **kwargs) for report in get_reports(question)]

def run_report(question, report, **kwargs):
    output = report.copy()
    output['question_id'] = question.id
    query = build_query(question, report['spec'], **kwargs)
    cursor = connection.cursor()
{'fraction_non_alphanumeric': 0.10138648180242635, 'fraction_numerical': 0.0, 'mean_word_length': 5.6, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1046123', 'n_tokens_mistral': 326, 'n_tokens_neox': 319, 'n_words': 102}