Skip to content

Commit aec8d5f

Browse files
authored
Merge pull request #4404 from nextcloud/fix/clone-poll
Fix cloning poll
2 parents bb760ae + 200ceba commit aec8d5f

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file.
88
## [unreleased]
99
### Fixed
1010
- Changed sql query to be ansi safe
11+
- Cloning polls
1112

1213
### Added
1314
- Show locale date as tooltip for relative date time information

lib/Service/OptionService.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,9 @@ public function shift(int $pollId, int $step, string $unit): array {
332332
*/
333333
public function clone(int $fromPollId, int $toPollId): void {
334334
$this->pollMapper->get($fromPollId)
335-
->request(Poll::PERMISSION_POLL_ACCESS)
335+
->request(Poll::PERMISSION_POLL_ACCESS);
336+
337+
$this->pollMapper->get($toPollId)
336338
->request(Poll::PERMISSION_OPTION_ADD);
337339

338340
foreach ($this->optionMapper->findByPoll($fromPollId) as $origin) {

0 commit comments

Comments
 (0)