diff --git a/controller/pagecontroller.php b/controller/pagecontroller.php index f0109bc4b..d4a00217b 100644 --- a/controller/pagecontroller.php +++ b/controller/pagecontroller.php @@ -363,8 +363,8 @@ public function insertVote($pollId, $userId, $types, $dates, $notif, $changed) { } else { $userId = $userId . ' (extern)'; } + $poll = $this->eventMapper->find($pollId); if($changed === 'true') { - $poll = $this->eventMapper->find($pollId); $dates = json_decode($dates); $types = json_decode($types); if($poll->getType() === '0') $this->participationMapper->deleteByPollAndUser($pollId, $userId);