Skip to content

Commit

Permalink
Fixed issue: Database error when deleting a participant from CPDB and…
Browse files Browse the repository at this point in the history
… connected survey participant tables
  • Loading branch information
c-schmitz committed Nov 8, 2021
1 parent b226c14 commit bfc4ddb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion application/models/Participant.php
Expand Up @@ -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);
}
Expand Down

0 comments on commit bfc4ddb

Please sign in to comment.