Fixed #34903, Refs #34825 -- Made workers initialization respect empty set of used connections.

Thanks to David Smith for the investigation & patch.

Regression in 2128a73713.
Follow up to a5905b164d.

Co-authored-by: David Sanders <shang.xiao.sanders@gmail.com>
This commit is contained in:
David Sanders 2023-10-23 14:41:34 +11:00 committed by GitHub
parent b5311ee232
commit 68d0159b6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -431,7 +431,7 @@ def _init_worker(
django.setup()
setup_test_environment(debug=debug_mode)
db_aliases = used_aliases or connections
db_aliases = used_aliases if used_aliases is not None else connections
for alias in db_aliases:
connection = connections[alias]
if start_method == "spawn":