<commit_before>from datetime import date
from meps.models import OrganizationMEP, CommitteeRole, DelegationRole
from django import template

register = template.Library()

@register.simple_tag
def current_organization_role(mep, organization):
    return OrganizationMEP.objects.get(mep=mep, organization=organization, end=date(9999, 12, 31)).role

@register.simple_tag
def current_committee_role(mep, committee):
    return CommitteeRole.objects.get(mep=mep, committee=committee, end=date(9999, 12, 31)).role

@register.simple_tag
def current_delegation_role(mep, delegation):
    return DelegationRole.objects.get(mep=mep, delegation=delegation, end=date(9999, 12, 31)).role<commit_msg>[fix] remove date parameter in queries to get role of meps in various stuff in the templatetags<commit_after>from datetime import date
from meps.models import OrganizationMEP, CommitteeRole, DelegationRole
from django import template

register = template.Library()

@register.simple_tag
def current_organization_role(mep, organization):
    return OrganizationMEP.objects.get(mep=mep, organization=organization).role

@register.simple_tag
def current_committee_role(mep, committee):
    return CommitteeRole.objects.get(mep=mep, committee=committee).role

@register.simple_tag
def current_delegation_role(mep, delegation):
    return DelegationRole.objects.get(mep=mep, delegation=delegation).role
{'fraction_non_alphanumeric': 0.08959537572254335, 'fraction_numerical': 0.017341040462427744, 'mean_word_length': 7.65625, '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': '6066128', 'n_tokens_mistral': 434, 'n_tokens_neox': 404, 'n_words': 98}