Commit 31908271 authored by Kevin Robert's avatar Kevin Robert
Browse files

Correctif export.

parent 53bfaee9
......@@ -8,6 +8,7 @@ import org.apache.commons.lang3.StringUtils;
import java.util.LinkedList;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
/**
......@@ -73,7 +74,16 @@ public class MultipleChoiceItem extends AbstractQuestion implements ExportableIt
}
private String getLabelForValue(String code) {
return choices.stream().filter(choice -> choice.getValue().equals(code)).findFirst().orElseThrow().getLabel();
String codeFormatted = code.trim();
Optional<Choice> choiceOptional = choices.stream().filter(choice -> codeFormatted.equals(choice.getValue().trim())).findFirst();
if (choiceOptional.isPresent()) {
Choice choice = choiceOptional.get();
if (StringUtils.isNotBlank(choice.getLabel())) {
return choice.getLabel();
}
return choice.getValue();
}
return code;
}
@JsonIgnore
......
......@@ -4,7 +4,7 @@ import Meta from 'vue-meta';
Vue.use(Meta);
export const metaInfo = {
title: 'Aplly Orientactive',
title: 'Aplly',
titleTemplate: '%s',
meta: [
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment