Fix null multiple field for poll posts

This commit is contained in:
Tim
2025-08-31 14:22:44 +08:00
parent 38ff04c358
commit 6a27fbe1d7
2 changed files with 2 additions and 2 deletions

View File

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

View File

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