[patch] Accessing many-to-many relationships without a PK value should throw exceptions
|Reported by:||Luke Plant||Owned by:||Adrian Holovaty|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
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.