#31486: Deprecate passing unsaved objects to related filters.
-------------------------------------+-------------------------------------
Reporter: Mapiarz | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):
* type: Uncategorized => Bug
* version: 2.2 => master
* stage: Unreviewed => Accepted
Comment:
Regarding [https://code.djangoproject.com/ticket/27985#comment:14 this
comment] I still think that deprecating passing unsaved objects to related
filters is worth doing so I'll accept this ticket on this basis.
Mapiarz, would you be interested in
[https://docs.djangoproject.com/en/3.0/internals/contributing/writing-code
/submitting-patches/#deprecating-a-feature submitting a patch doing so]?
It might require a bit of adjustments in the suite but I think that
warning on `obj.pk is None` is the way to go as it's less controversial
than `obj._state.adding`.
--
Ticket URL: <https://code.djangoproject.com/ticket/31486#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/065.10a5af95919741806ff4b1f637cb1bad%40djangoproject.com.