#24937: DateTimeRangeField.value_to_string raises TypeError
----------------------------------+------------------------------------
Reporter: unklphil | Owner: dracos
Type: Bug | Status: closed
Component: contrib.postgres | Version: 1.8
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+------------------------------------
Comment (by Tim Graham <timograham@…>):
In [changeset:"2c96b3da6f9be3795bd2ded59175332aa986bf2d" 2c96b3d]:
{{{
#!CommitTicketReference repository=""
revision="2c96b3da6f9be3795bd2ded59175332aa986bf2d"
[1.8.x] Refs #24937 -- Backported more commits to fix for serialization of
Date(Time)RangeField.
Instead of using DjangoJSONEncoder, use base_field's value_to_string().
Note this means the serialization of e.g. IntegerRangeField now has
strings for lower and upper, so use to_python when they came back in
(same behaviour as ArrayField, hopefully, from where I also got the
set_attributes_from_name function).
Backport of 86d9b10dc33cc115fee2ecab40a569354ac55d15 and
8a842148b6deaab021526e2689279cf5e232945f from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24937#comment:10>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/066.1f4272f3080d52d2bf6c156d6d422043%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.