Make sure lab has id before assigning tasks

What does this mr do?

Lab did not yet have an id when creating the tasks.

Actions taken to fix bug

When creating the tasks we use a lab which has already been saved such that it already contains an id.

Does this MR meet the acceptance criteria?

  • I have added a changelog entry to reflect the significant changes I made and the bug I fixed.
  • A test was created to test the bug.
  • I have updated the documentation accordingly.
  • I adhere to the style guide.

Merge request reports