Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#24566 closed Bug (fixed)

MigrationWriter doesn't serialize timedelta

Reported by: Marten Kenbeek Owned by: nobody
Component: Migrations Version: 1.8
Severity: Release blocker Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

makemigrations fails when using a timedelta object as a default value for a model field.

As the docs explicitly state that the new DurationField is "modeled in Python by timedelta", I'm categorizing this as a bug in 1.8 rather than a new feature.

Change History (5)

comment:1 Changed 4 years ago by Tim Graham

Severity: NormalRelease blocker
Triage Stage: UnreviewedAccepted

comment:2 Changed 4 years ago by Baptiste Mispelon

Has patch: set

comment:3 Changed 4 years ago by Tim Graham

Triage Stage: AcceptedReady for checkin

comment:4 Changed 4 years ago by Baptiste Mispelon <bmispelon@…>

Resolution: fixed
Status: newclosed

In 30a3c2f:

Fixed #24566 -- Added support for serializing timedelta

Thanks to knbk for the report.

comment:5 Changed 4 years ago by Baptiste Mispelon <bmispelon@…>

In 09188b5:

[1.8.x] Fixed #24566 -- Added support for serializing timedelta

Thanks to knbk for the report.

Backport of 30a3c2f74c030449d3a8b9f02ab6744874712e54 from master.

Note: See TracTickets for help on using tickets.
Back to Top