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))