<commit_before>import django_filters

from nodeconductor.core.filters import UUIDFilter, URLFilter

from . import models


class InvoiceFilter(django_filters.FilterSet):
    customer_uuid = UUIDFilter(name='customer__uuid')
    state = django_filters.MultipleChoiceFilter(choices=models.Invoice.States.CHOICES)

    class Meta(object):
        model = models.Invoice
        fields = ('customer_uuid', 'state', 'year', 'month')


class PaymentDetailsFilter(django_filters.FilterSet):
    customer = UUIDFilter(name='customer__uuid')
    customer_url = URLFilter(
        view_name='customer-detail',
        name='customer__uuid',
    )

    class Meta(object):
        model = models.PaymentDetails
        fields = [
            'customer',
            'customer_url',
            'company',
            'address',
            'country',
            'email',
            'postal',
            'phone',
            'bank',
            'account',
            'default_tax_percent',
        ]
        order_by = [
            'customer',
            'company',
            'address',
            'country',
            'email',
            'postal',
            'phone',
            'bank',
            'account',
            # descending
            '-customer',
            '-company',
            '-address',
            '-country',
            '-email',
            '-postal',
            '-phone',
            '-bank',
            '-account',
        ]<commit_msg>Remove redundant filters and order_by<commit_after>import django_filters

from nodeconductor.core.filters import UUIDFilter, URLFilter

from . import models


class InvoiceFilter(django_filters.FilterSet):
    customer_uuid = UUIDFilter(name='customer__uuid')
    state = django_filters.MultipleChoiceFilter(choices=models.Invoice.States.CHOICES)

    class Meta(object):
        model = models.Invoice
        fields = ('customer_uuid', 'state', 'year', 'month')


class PaymentDetailsFilter(django_filters.FilterSet):
    customer = UUIDFilter(name='customer__uuid')
    customer_url = URLFilter(
        view_name='customer-detail',
        name='customer__uuid',
    )

    class Meta(object):
        model = models.PaymentDetails
        fields = [
            'customer',
            'customer_url',
        ]
{'fraction_non_alphanumeric': 0.11120840630472854, 'fraction_numerical': 0.0, 'mean_word_length': 2.0184940554821664, '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': '5996093', 'n_tokens_mistral': 610, 'n_tokens_neox': 590, 'n_words': 113}