M2M fields should type-check rather than just trying for a split() method
|Reported by:||melinath||Owned by:||melinath|
|Component:||Database layer (models, ORM)||Version:||1.5-alpha-1|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
When setting up a relationship between two models, the "relation" argument to add_lazy_relation  can be either a Model subclass or a string. But the check for whether it's a string is simply "try calling relation.split(".")". If the argument is a Model subclass with a split() method, this fails horribly and unexpectedly.