From a57a5b6b837770996fb44f2271fcc92872cec636 Mon Sep 17 00:00:00 2001 From: Cristian Date: Fri, 11 Dec 2020 18:02:56 -0500 Subject: [PATCH] refactor: call setup_django with the `check_db` attribute for the commands that actually need the database --- archivebox/cli/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archivebox/cli/__init__.py b/archivebox/cli/__init__.py index 3df41809..f9a55efd 100644 --- a/archivebox/cli/__init__.py +++ b/archivebox/cli/__init__.py @@ -63,7 +63,7 @@ def run_subcommand(subcommand: str, if subcommand not in meta_cmds: from ..config import setup_django - setup_django(in_memory_db=subcommand in fake_db) + setup_django(in_memory_db=subcommand in fake_db, check_db=subcommand in archive_cmds) module = import_module('.archivebox_{}'.format(subcommand), __package__) module.main(args=subcommand_args, stdin=stdin, pwd=pwd) # type: ignore