#23604: Regression in allowing to handle M2M fields from the "receiving end" -
follow up to #23329
--------------------------------------+------------------------------------
Reporter: nanuxbe | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 1.7
Severity: Release blocker | Resolution:
Keywords: to_field_allowed,M2M | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by charettes):
* cc: charettes (added)
* needs_docs: 0 => 1
* severity: Normal => Release blocker
* stage: Unreviewed => Accepted
Comment:
Thanks for the detailed report. The issue seems valid and the patch seems
looks like the correct approach.
Could you open a PR against master only with the following changes:
1. `if opts.many_to_many and field.primary_key` should do.
2. Since this check is cheap and doesn't require access to the set of
registered model I would move it before they're collected.
3. Could you define an unreferenced model instead of relying on the
`Pizza` one to make sure the additional checks are still covered if
another model referring to `Pizza` is added in the future.
4. Could you add a comment with a reference to the ticket over the
assertion.
5. Since this is a regression and will be backported you'll need to add
the changes to the 1.4.16, 1.5.11, 1.6.8 and 1.7.1 release notes.
Let me know if you need additional help to land this.
--
Ticket URL: <https://code.djangoproject.com/ticket/23604#comment:3>
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/065.a6ba640cb29caf40b439e9b9ce34785f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.