handle if task doesnt exist
This commit is contained in:
parent
06c8c28071
commit
c46d78f2ae
@ -382,6 +382,9 @@ class VSETB_OT_import_shots(Operator):
|
|||||||
project = settings.active_project
|
project = settings.active_project
|
||||||
|
|
||||||
task = tracker.get_task(task_type.id or task_type.name, entity=shot)
|
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)
|
last_comment = tracker.get_last_comment_with_preview(task)
|
||||||
if not last_comment:
|
if not last_comment:
|
||||||
return
|
return
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user