Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#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: master
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


For background, see:

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)

m2m_requires_pk_val.patch (1.3 KB) - added by Luke Plant 13 years ago.

Download all attachments as: .zip

Change History (2)

Changed 13 years ago by Luke Plant

Attachment: m2m_requires_pk_val.patch added

comment:1 Changed 13 years ago by Adrian Holovaty

Resolution: fixed
Status: newclosed

(In [2817]) Fixed #1745 -- Accessing many-to-many relationships without a PK value now throws an exception. Thanks, Luke

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