Compare commits

...

2 Commits

Author SHA1 Message Date
Tim
6a27fbe1d7 Fix null multiple field for poll posts 2025-08-31 14:22:44 +08:00
Tim
38ff04c358 Merge pull request #803 from nagisa77/codex/add-baseswitch-component-to-voting-post
feat(poll): use BaseSwitch for multiple selection
2025-08-31 14:13:32 +08:00
2 changed files with 2 additions and 2 deletions

View File

@@ -111,7 +111,7 @@ public class PostMapper {
.collect(Collectors.groupingBy(PollVote::getOptionIndex,
Collectors.mapping(v -> userMapper.toAuthorDto(v.getUser()), Collectors.toList())));
p.setOptionParticipants(optionParticipants);
p.setMultiple(pp.isMultiple());
p.setMultiple(Boolean.TRUE.equals(pp.getMultiple()));
dto.setPoll(p);
}
}

View File

@@ -33,7 +33,7 @@ public class PollPost extends Post {
private Set<User> participants = new HashSet<>();
@Column
private boolean multiple = false;
private Boolean multiple = false;
@Column
private LocalDateTime endTime;