Skip to content

Commit

Permalink
Fixes #249
Browse files Browse the repository at this point in the history
  • Loading branch information
1-alex98 committed Sep 6, 2018
1 parent d9f737d commit 9c7fbc0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public Integer getOrdinal() {

@Transient
@ComputedAttribute
public int getNumberOfAnswers() {
public Integer getNumberOfAnswers() {
return numberOfAnswers;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ public void initialize(VotingSubjectRevealWinnerCheck constraintAnnotation) {

@Override
public boolean isValid(VotingSubject votingSubject, ConstraintValidatorContext context) {
return votingSubject.getRevealWinner() && votingSubject.getEndOfVoteTime().isBefore(OffsetDateTime.now());
return votingSubject.getRevealWinner() == null || !votingSubject.getRevealWinner() || votingSubject.getEndOfVoteTime().isBefore(OffsetDateTime.now());
}
}

0 comments on commit 9c7fbc0

Please sign in to comment.