Tweak the variable name

This commit is contained in:
tcely authored and GitHub committed 2025-03-27 14:16:45 -04:00
1 parent f4385b8a5f
commit b223e795e0
1 file changed
+2 -2
+2 -2
View File
@@ -766,7 +766,7 @@ def wait_for_media_premiere(media_id):
media.save() media.save()
@background(schedule=90, remove_existing_tasks=False) @background(schedule=90, remove_existing_tasks=False)
def delete_all_media_for_source(source_id, source_name, source_directory_path): def delete_all_media_for_source(source_id, source_name, source_directory):
source = None source = None
try: try:
source = Source.objects.get(pk=source_id) source = Source.objects.get(pk=source_id)
@@ -786,7 +786,7 @@ def delete_all_media_for_source(source_id, source_name, source_directory_path):
with atomic(): with atomic():
media.delete() media.delete()
# Remove the directory, if the user requested that # Remove the directory, if the user requested that
directory_path = Path(source_directory_path) directory_path = Path(source_directory)
if (directory_path / '.to_be_removed').is_file(): if (directory_path / '.to_be_removed').is_file():
log.info(f'Deleting directory for: {source_name}: {directory_path}') log.info(f'Deleting directory for: {source_name}: {directory_path}')
rmtree(directory_path, True) rmtree(directory_path, True)