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