This is an automated email from the git hooks/post-receive script. New commit to branch release/3.3.8 in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit dd64f11664aa9f9f8822c8b87d824b91b550fb0e Author: jcouteau <couteau@codelutin.com> Date: Wed May 13 10:03:05 2020 +0200 Fix tests if no questions in poll coming from services (should happen only during tests) --- .../org/chorem/pollen/services/service/PollService.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/pollen-services/src/main/java/org/chorem/pollen/services/service/PollService.java b/pollen-services/src/main/java/org/chorem/pollen/services/service/PollService.java index b029a27a..c8cc65ae 100644 --- a/pollen-services/src/main/java/org/chorem/pollen/services/service/PollService.java +++ b/pollen-services/src/main/java/org/chorem/pollen/services/service/PollService.java @@ -143,13 +143,15 @@ public class PollService extends PollenServiceSupport { Date beginAddChoiceDate = null; Date endAddChoiceDate = null; Boolean addChoiceEnabled = false; - for(QuestionBean question: bean.getQuestions()) { - addChoiceEnabled = addChoiceEnabled || question.isChoiceAddAllowed(); - if (question.getBeginChoiceDate() != null && (beginAddChoiceDate == null || question.getBeginChoiceDate().before(beginAddChoiceDate))) { - beginAddChoiceDate = question.getBeginChoiceDate(); - } - if (question.getEndChoiceDate() != null && (endAddChoiceDate == null || question.getEndChoiceDate().after(endAddChoiceDate))) { - endAddChoiceDate = question.getEndChoiceDate(); + if (bean.getQuestions() != null) { + for (QuestionBean question : bean.getQuestions()) { + addChoiceEnabled = addChoiceEnabled || question.isChoiceAddAllowed(); + if (question.getBeginChoiceDate() != null && (beginAddChoiceDate == null || question.getBeginChoiceDate().before(beginAddChoiceDate))) { + beginAddChoiceDate = question.getBeginChoiceDate(); + } + if (question.getEndChoiceDate() != null && (endAddChoiceDate == null || question.getEndChoiceDate().after(endAddChoiceDate))) { + endAddChoiceDate = question.getEndChoiceDate(); + } } } -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.