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
This commit is contained in:
Russell Keith-Magee 2010-05-08 07:41:22 +00:00
parent e34ca2b1e2
commit 6b1a2a8e44
1 changed files with 1 additions and 1 deletions

View File

@ -256,7 +256,7 @@ master/slave relationship between the databases ``master``, ``slave1`` and
def allow_relation(self, obj1, obj2, **hints): def allow_relation(self, obj1, obj2, **hints):
"Allow any relation between two objects in the db pool" "Allow any relation between two objects in the db pool"
db_list = ('master','slave1','slave2') 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 True
return None return None