Opened 14 years ago
Closed 13 years ago
#15339 closed Bug (wontfix)
Please document the behaviour of RelatedManager when the same object is added twice
Reported by: | jammon | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | 1.3-beta |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
As I understand the code in django.db.models.fields.related
the _add_items
method of ManyRelatedManager
takes care that the same object isn't added twice.
So I suggest to document that in /ref/models/relations/#django.db.models.fields.related.RelatedManager.add
, maybe like this: "Adding a model that is already in the related object set has no effect, it won't be contained twice afterwards."
(I looked it up in the code, but just a year ago that would have been difficult for me.)
Change History (3)
comment:1 by , 14 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 14 years ago
Severity: | → Normal |
---|---|
Type: | → Bug |
comment:3 by , 13 years ago
Easy pickings: | unset |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
UI/UX: | unset |
Note:
See TracTickets
for help on using tickets.
Sorry, please forget it. It was a linguistic problem on my side. (It's just the way sets work.)