Fix crash when importing events for public company tasks

This commit is contained in:
allegroai 2024-02-13 16:17:52 +02:00
parent 5799baae45
commit ee8eb03698

View File

@ -182,6 +182,9 @@ def get_many_tasks_for_writing(
)
)
if not company_id:
return result
forbidden_tasks = {task.id for task in result if not task.company}
if forbidden_tasks:
if throw_on_forbidden: