Fix plugin wizard for foreign languages (#2086)

This fixes the plugin wizard, that throws a NullPointerException for other languages then Englisch or German.
This commit is contained in:
René Pfeuffer
2022-07-13 09:28:56 +02:00
committed by GitHub
parent fc2a40cab5
commit d7943a0551
3 changed files with 38 additions and 13 deletions

View File

@@ -59,6 +59,9 @@ public class PluginSetDtoMapper {
.collect(Collectors.toList());
PluginSet.Description description = pluginSet.getDescriptions().get(locale.getLanguage());
if (description == null) {
description = pluginSet.getDescriptions().get(Locale.ENGLISH.getLanguage());
}
return new PluginSetDto(pluginSet.getId(), pluginSet.getSequence(), pluginDtos, description.getName(), description.getFeatures(), pluginSet.getImages());
}