handle if task doesnt exist

This commit is contained in:
florentin.luce 2025-02-19 14:53:40 +01:00
parent 06c8c28071
commit c46d78f2ae

View File

@ -382,6 +382,9 @@ class VSETB_OT_import_shots(Operator):
project = settings.active_project
task = tracker.get_task(task_type.id or task_type.name, entity=shot)
if not task:
print(f'No task {task_type.name} found for {shot["name"]}')
return
last_comment = tracker.get_last_comment_with_preview(task)
if not last_comment:
return