From b20b33b838ea838b19e76ebee265b47e06f20d40 Mon Sep 17 00:00:00 2001 From: jooola Date: Tue, 27 Jun 2023 12:25:31 +0000 Subject: [PATCH] style: Simplify code Part-of: --- api/funkwhale_api/common/management/commands/inplace_to_s3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/funkwhale_api/common/management/commands/inplace_to_s3.py b/api/funkwhale_api/common/management/commands/inplace_to_s3.py index c9fca94ce..bc0b753bc 100644 --- a/api/funkwhale_api/common/management/commands/inplace_to_s3.py +++ b/api/funkwhale_api/common/management/commands/inplace_to_s3.py @@ -73,7 +73,7 @@ class Command(BaseCommand): self.stdout.write(f"Found {to_change.count()} uploads to update.") - target = options["target"] if options["target"] else options["source"] + target = options.get("target", options["source"]) for upl in to_change: upl.audio_file = str(upl.source).replace(str(prefix), str(target))