fix: Make sure to set right target when none is given

Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2506>
This commit is contained in:
Georg Krause 2023-09-13 10:38:34 +02:00 committed by Georg Krause
parent 9ee75d0252
commit afbaa49bb3
1 changed files with 3 additions and 1 deletions

View File

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