mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-19 17:41:19 +00:00
Format Python code with black
This commit is contained in:
@@ -9,17 +9,17 @@ class Command(BaseCommand):
|
||||
help = "Manages the document index."
|
||||
|
||||
def add_arguments(self, parser):
|
||||
parser.add_argument("command", choices=['reindex', 'optimize'])
|
||||
parser.add_argument("command", choices=["reindex", "optimize"])
|
||||
parser.add_argument(
|
||||
"--no-progress-bar",
|
||||
default=False,
|
||||
action="store_true",
|
||||
help="If set, the progress bar will not be shown"
|
||||
help="If set, the progress bar will not be shown",
|
||||
)
|
||||
|
||||
def handle(self, *args, **options):
|
||||
with transaction.atomic():
|
||||
if options['command'] == 'reindex':
|
||||
index_reindex(progress_bar_disable=options['no_progress_bar'])
|
||||
elif options['command'] == 'optimize':
|
||||
if options["command"] == "reindex":
|
||||
index_reindex(progress_bar_disable=options["no_progress_bar"])
|
||||
elif options["command"] == "optimize":
|
||||
index_optimize()
|
||||
|
||||
Reference in New Issue
Block a user