Skip to content

Strange behaviour of DictionaryProxy #92

@Widly

Description

@Widly

Hi!

I have ES document with date field and corresponding Django model DateTimeField. However, when i'm trying to retrieve document via drf, it returns datetime.date object, not datetime.datetime, how expected.
In debug mode i found, that serializer gets field values through DictionaryProxy (utils.py):
image
Why it should convert datetime.datetime to datetime.date?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions