Skip to content

AttributeError: 'Query' object has no attribute 'explain_query' #125

@DiegoMagg

Description

@DiegoMagg

Django 4 came with some changes to the query.py file, now we don't have the self.explain_query = False anymore, so this error is thrown.

image

Django 3.x query.py file: https://github.com/django/django/blob/stable/3.2.x/django/db/models/sql/query.py#L245
Django 4.x query.py file: https://github.com/django/django/blob/main/django/db/models/sql/query.py#L227

Error location: https://github.com/ESSolutions/django-mssql-backend/blob/master/sql_server/pyodbc/compiler.py#L294

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions