Delete detail when a lecture or a group is deleted