Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#21491 closed Cleanup/optimization (fixed)

Remove outdated workaround in ManyToManyField.related_name documentation

Reported by: Baptiste Mispelon Owned by: nobody
Component: Documentation Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

There used to be an issue where if you had two M2M fields pointing to the same model, you couldn't use related_name='+' on both.

This was reported in #15932 and fixed by documenting a workaround [1].

However, the underlying issue was fixed in #21375 so I think we can now remove the mention of the workaround.

[1] https://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.ManyToManyField.related_name

Change History (3)

comment:1 Changed 6 years ago by loic84

Has patch: set

I can confirm this fix addressed this specific issue.

PR https://github.com/django/django/pull/1965.

comment:2 Changed 6 years ago by Loic Bistuer <loic.bistuer@…>

Resolution: fixed
Status: newclosed

In 82a58ce5b67e0b79fa0efbad72e21d9d1be25ceb:

Fixed #21491 -- Removed documented workaround for a known issue.

The issue was that two M2M hidden reverse managers
(related_name ending with a '+') could clash with each other.

Refs #21375 and #15932. Thanks Baptiste.

comment:3 Changed 6 years ago by Claude Paroz <claude@…>

In 47afe073244b5a2611d15c47f980e729b2c728c3:

Merge pull request #1965 from loic/ticket21491

Fixed #21491 -- Removed documented workaround for a known issue.

Note: See TracTickets for help on using tickets.
Back to Top