From afbaa49bb39bf1cde89ecade64bb94559b508b72 Mon Sep 17 00:00:00 2001 From: Georg Krause Date: Wed, 13 Sep 2023 10:38:34 +0200 Subject: [PATCH] fix: Make sure to set right target when none is given Part-of: --- api/funkwhale_api/common/management/commands/inplace_to_s3.py | 4 +++- 1 file changed, 3 insertions(+), 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 bc0b753bc..e973b8466 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,9 @@ class Command(BaseCommand): self.stdout.write(f"Found {to_change.count()} uploads to update.") - target = options.get("target", options["source"]) + target = options.get("target") + if target is None: + target = options["source"] for upl in to_change: upl.audio_file = str(upl.source).replace(str(prefix), str(target))