Fix shell_scoped without shell_plus (#3292)

This commit is contained in:
Tobias Kunze
2023-05-04 21:09:32 +02:00
committed by GitHub
parent 369f4b6f8d
commit b29686d9f2

View File

@@ -51,7 +51,7 @@ class Command(BaseCommand):
del options['skip_checks']
del options['print_sql']
if options['print_sql']:
if options.get('print_sql'):
connection.force_debug_cursor = True
logger = logging.getLogger("django.db.backends")
logger.setLevel(logging.DEBUG)