diff --git a/management/commands/generate_clips.py b/management/commands/generate_clips.py index 02a6f2d..270c6bd 100644 --- a/management/commands/generate_clips.py +++ b/management/commands/generate_clips.py @@ -46,7 +46,7 @@ class Command(BaseCommand): type_ = e.data['type'][0].lower() target = os.path.join(prefix, type_, i.data['title'] + ext) os.makedirs(os.path.dirname(target), exist_ok=True) - if os.path.exists(target): + if os.path.islink(target): os.unlink(target) os.symlink(source, target) clip[type_] = target