Skip to content

After upgrade to 3.17.0 the null datetime values are not rendered and a ValueError is raised #9927

@browniebroke

Description

@browniebroke

Discussed in #9925

Originally posted by kazei92 March 19, 2026
The problem is with this line:
datetime.datetime.fromisoformat(field_value) if format_ == ISO_8601

Line Link

in rest_framework\renderers.py.

If the field_value is an empty string '', a ValueError is raised.
Before 3.17.0 the empty date strings were supported.

I don't know if this is an issue or the null values are not handled properly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions