Skip to content

date_trunc_sql() takes 3 positional arguments but 4 were given #118

Open
@brucegibbins

Description

@brucegibbins

Hi.

Platform: Windows
Python v3.9.5
Django v3.2.4
django-mssql-backend v2.8.1
pyodbc v4.0.30

This is a new upgraded environment after moving from a functional Python v3.6.x and Django v.2.1.7 which was using django-pyodbc-azure v2.1.0

It seems that if I have a ModelAdmin Class that uses the date_hierarchy attribute then we will get the error at line 204 in

\Lib\site-packages\django\db\models\functions\datetime.py", line 204

Other details that maybe of relevance are that:-

The database field type is date and not datetime

The django debug dump indicates tzname is None and the connection object is sql_server.pyodbc.base.DatabaseWrapper

I hope this is enough detail. Please advise if I can add any extra info.

Thank-you in advance

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