mirror of https://github.com/django/django.git
[3.1.x] Made small improvement to docs/topics/db/multi-db.txt.
Backport of 682b295c6c
from master
This commit is contained in:
parent
c3bd48c4cb
commit
22dac456f3
|
@ -373,8 +373,8 @@ from::
|
||||||
Relations between objects are allowed if both objects are
|
Relations between objects are allowed if both objects are
|
||||||
in the primary/replica pool.
|
in the primary/replica pool.
|
||||||
"""
|
"""
|
||||||
db_list = ('primary', 'replica1', 'replica2')
|
db_set = {'primary', 'replica1', 'replica2'}
|
||||||
if obj1._state.db in db_list and obj2._state.db in db_list:
|
if obj1._state.db in db_set and obj2._state.db in db_set:
|
||||||
return True
|
return True
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue