1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00

Made small improvement to docs/topics/db/multi-db.txt.

This commit is contained in:
Nikita Sobolev 2020-06-01 11:20:00 +03:00 committed by GitHub
parent 19ceabefd4
commit 682b295c6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -373,8 +373,8 @@ from::
Relations between objects are allowed if both objects are
in the primary/replica pool.
"""
db_list = ('primary', 'replica1', 'replica2')
if obj1._state.db in db_list and obj2._state.db in db_list:
db_set = {'primary', 'replica1', 'replica2'}
if obj1._state.db in db_set and obj2._state.db in db_set:
return True
return None