DurationField form field value populated with instance.__repr__()
Or,
In the admin's add view for a model of mine I entered a 1 day duration in 1 0:00
format into the input for a DurationField
on the model, I saved my model instance. This worked fine, and redirected me back to the admin list view, where that instance's DurationField
's value was displayed as 1 day, 0:00:00
(default timedelta.__repr__
). I visited the instance's change view, where the same input now also contained 1 day, 0:00:00
(default timedelta.__repr__
again). I tried saving the instance again, and received a validation error of '1 day, 0:00:00' value has an invalid format. It must be in [DD] [HH:[MM:]]ss[.uuuuuu] format.
(raised in django.db.models.fields.DurationField.to_python
).
Change History
(5)
Severity: |
Normal → Release blocker
|
Triage Stage: |
Unreviewed → Accepted
|
Type: |
Uncategorized → Bug
|
Owner: |
changed from nobody to Tim Graham
|
Status: |
new → assigned
|
Resolution: |
→ fixed
|
Status: |
assigned → closed
|
PR