#28356: Serializer got error when datetime field receive string instead datetime
object
-------------------------------------+-------------------------------------
Reporter: Hermogenes Batista | Owner:
da Silva Filho | Hermogenes Batista da Silva Filho
Type: Bug | Status: closed
Component: Database layer | Version: 1.11
(models, ORM) |
Severity: Normal | Resolution: wontfix
Keywords: serializer | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):
* status: assigned => closed
* resolution: => wontfix
Comment:
I'm still not convinced that Django should head down the path of trying to
handle field types that are different from the type that's retrieved from
the database (see #27825 for another case). Just because strings happen to
work to saving a model instance doesn't mean that the Django ecosystem
should be prepared to handle a string for these fields -- that'll add a
lot of complexity. Also, the usual case for serializers is to handle
objects from the database, not unsaved model instances, so my opinion is
that fixing this in your code is more appropriate than adding more
complexity to Django. If you still disagree, feel free to write to the
DevelopersMailingList to get other opinions.
--
Ticket URL: <https://code.djangoproject.com/ticket/28356#comment:5>
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/075.874d412d5b4ee22cf8de0d520c933a84%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.