diff --git a/application/models/Participant.php b/application/models/Participant.php index 84f8e6f4812..3ff70b1316a 100755 --- a/application/models/Participant.php +++ b/application/models/Participant.php @@ -1113,7 +1113,9 @@ public function deleteParticipantTokenAnswer($sParticipantsIDs) if (!empty($tokenAndId['participant_id']) && $surveyTableExists) { /** @var Token $token */ $token = Token::model($aSurveyID)->find('participant_id = :pid', [':pid' => $tokenAndId['participant_id']]); - $token->delete(); + if (!is_null($token)) { + $token->delete(); + } } $iDeletedParticipants = $this->deleteParticipants($sParticipantsIDs, false); }