Commit 6b1a2a8e authored by Russell Keith-Magee's avatar Russell Keith-Magee
Browse files

Fixed #13428 -- Corrected the allow_relation behavior of and example router....

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
parent e34ca2b1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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