From 6b1a2a8e44071a2b7415b3016227d12d382f17f2 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Sat, 8 May 2010 07:41:22 +0000 Subject: [PATCH] Fixed #13428 -- Corrected the allow_relation behavior of and example router. Thanks to jcd for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13133 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/topics/db/multi-db.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/topics/db/multi-db.txt b/docs/topics/db/multi-db.txt index 72b5116504..27dc2261ca 100644 --- a/docs/topics/db/multi-db.txt +++ b/docs/topics/db/multi-db.txt @@ -256,7 +256,7 @@ master/slave relationship between the databases ``master``, ``slave1`` and 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