[BUG] Fix child or parent ticket deletion

:bug:

When one of the two linked tickets is removed, the application crashes on the other one. This PR fixes this issue.

/cc @maximeprades