Browse files

Fixed #13428 -- Corrected the allow_relation behavior of and example …

…router. Thanks to jcd for the report and patch.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent e34ca2b commit 6b1a2a8e44071a2b7415b3016227d12d382f17f2 @freakboy3742 freakboy3742 committed May 8, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 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

0 comments on commit 6b1a2a8

Please sign in to comment.