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:
parent
9ee75d0252
commit
afbaa49bb3
|
@ -73,7 +73,9 @@ class Command(BaseCommand):
|
||||||
|
|
||||||
self.stdout.write(f"Found {to_change.count()} uploads to update.")
|
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:
|
for upl in to_change:
|
||||||
upl.audio_file = str(upl.source).replace(str(prefix), str(target))
|
upl.audio_file = str(upl.source).replace(str(prefix), str(target))
|
||||||
|
|
Loading…
Reference in New Issue