#1745 closed defect (fixed)
[patch] Accessing many-to-many relationships without a PK value should throw exceptions
Reported by: | Luke Plant | Owned by: | Adrian Holovaty |
---|---|---|---|
Component: | Metasystem | Version: | dev |
Severity: | normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
For background, see:
http://groups.google.com/group/django-users/browse_frm/thread/9ab2c6f7115a1c1b/6f859e5f1941f3c1#6f859e5f1941f3c1
Basically, if you access m2m fields before the object has a primary key value, you get incorrect results. The attached patch fixes this and throws a helpful exception.
It also includes a fix for a nonsense test that was discovered by the patch.
Attachments (1)
Change History (2)
by , 19 years ago
Attachment: | m2m_requires_pk_val.patch added |
---|
comment:1 by , 19 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
(In [2817]) Fixed #1745 -- Accessing many-to-many relationships without a PK value now throws an exception. Thanks, Luke