Skip to content

Commit

Permalink
feat: Fix error with polls not having created_user_id
Browse files Browse the repository at this point in the history
  • Loading branch information
KminekMatej committed Sep 6, 2024
1 parent b10912a commit f23ea60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/module/setting/presenter/front/PollPresenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function renderDefault(): void
$poll->getCaption(),
$poll->getDescription(),
$this->translator->translate("poll." . strtolower($poll->getStatus())),
$poll->getCreatedAt()->format(BaseModel::DATE_CZECH_FORMAT) . ", " . $this->userManager->getById($poll->getCreatedById())->getDisplayName(),
$poll->getCreatedAt()->format(BaseModel::DATE_CZECH_FORMAT) . ($poll->getCreatedById() ? ", " . $this->userManager->getById($poll->getCreatedById())?->getDisplayName() : ""),
]);
}

Expand Down

0 comments on commit f23ea60

Please sign in to comment.