carljm/django-model-utils — pull request #42 by CrazyCasta (2013-05-04 20:04:29+00:00)
Title: Small bug fix and feature addition.

Please note that I have made a choice in the feature addition that people might like to have full downcasting even if the associated select_related isn't available (because of django <1.6 bugs). If you don't like it, feel free to take it out. However, the second part is indeed a bug, if you have multiple grandchildren from a single child, the instance is not the first grandchild checked, but it is a sibling to the grandchild checked, then the child class will be taken instead of continuing on to the other grandchildren.

* Down-cast to final level even if we can't select the related data (in < 1.6)
* Fix bug where child classes are accepted if grand-child doesn't match even if
there are more grand-child classes to check.