Author: russellm Date: 2010-05-08 02:41:22 -0500 (Sat, 08 May 2010) New Revision: 13133
Modified: django/trunk/docs/topics/db/multi-db.txt Log: Fixed #13428 -- Corrected the allow_relation behavior of and example router. Thanks to jcd for the report and patch. Modified: django/trunk/docs/topics/db/multi-db.txt =================================================================== --- django/trunk/docs/topics/db/multi-db.txt 2010-05-08 07:34:53 UTC (rev 13132) +++ django/trunk/docs/topics/db/multi-db.txt 2010-05-08 07:41:22 UTC (rev 13133) @@ -256,7 +256,7 @@ def allow_relation(self, obj1, obj2, **hints): "Allow any relation between two objects in the db pool" db_list = ('master','slave1','slave2') - if obj1 in db_list and obj2 in db_list: + if obj1._state.db in db_list and obj2._state.db in db_list: return True return None -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-upda...@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.