Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaks Django #1

Open
jayvdb opened this issue Jun 25, 2020 · 0 comments
Open

Breaks Django #1

jayvdb opened this issue Jun 25, 2020 · 0 comments

Comments

@jayvdb
Copy link

jayvdb commented Jun 25, 2020

It probably breaks lots of stuff, but here is one

self = OrderBy(Col(django_content_type, contenttypes.ContentType.app_label), descending=False)
compiler = <django.db.models.sql.compiler.SQLCompiler object at 0x7fd67b2ad610>, connection = <django.db.backends.sqlite3.base.DatabaseWrapper object at 0x7fd67bd7dc40>
template = '%(expression)s %(ordering)s', extra_context = {}, expression_sql = '"django_content_type"."app_label"', params = []
placeholders = {'expression': '"django_content_type"."app_label"', 'ordering': 'ASC'}

    def as_sql(self, compiler, connection, template=None, **extra_context):
        if not template:
            if self.nulls_last:
                template = '%s NULLS LAST' % self.template
            elif self.nulls_first:
                template = '%s NULLS FIRST' % self.template
        connection.ops.check_expression_support(self)
        expression_sql, params = compiler.compile(self.expression)
        placeholders = {
            'expression': expression_sql,
            'ordering': 'DESC' if self.descending else 'ASC',
            **extra_context,
        }
        template = template or self.template
>       params *= template.count('%(expression)s')
E       TypeError: <lambda>() takes 1 positional argument but 2 were given

.tox/py38-django30/lib/python3.8/site-packages/django/db/models/expressions.py:1163: TypeError
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant