#34569: Unify all model fields to call get_prep_value from get_db_prep_value
-------------------------------------+-------------------------------------
Reporter: Julie Rymer | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Database layer | Version: 4.2
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):
* type: Uncategorized => Cleanup/optimization
Comment:
I knew that it'd open Pandora's box 😞 IMO we gain anything from adding:
{{{#!python
if not prepared:
value = self.get_prep_value(value)
}}}
to all these fields, but the community can decide otherwise. We have to be
very carefully with `ForeignKey` which has many subclasses.
> - UUIDField (this one even has a definition for `get_prep_value`, but it
is never called)
That's not true, see a [https://djangoci.com/view/%C2%ADCoverage/job
/django-
coverage/HTML_20Coverage_20Report/d_36b8140ab18a1a25___init___py.html#t2729
coverage report].
> - ForeignKey (like previous one, possess definition for
`get_prep_value`, never called)
That's not true, see a [https://djangoci.com/view/%C2%ADCoverage/job
/django-
coverage/HTML_20Coverage_20Report/d_36b8140ab18a1a25_related_py.html#t1154
coverage report].
--
Ticket URL: <https://code.djangoproject.com/ticket/34569#comment:1>
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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/010701882419bf01-c82ec8e1-a224-487b-837e-7e19327a2db1-000000%40eu-central-1.amazonses.com.