Skip to content
This repository was archived by the owner on May 5, 2021. It is now read-only.

Commit b148d30

Browse files
author
barnabartha
committed
SORMAS-Foundation#3259 - fix campaign test
1 parent caf9d2d commit b148d30

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

sormas-backend/src/main/java/de/symeda/sormas/backend/campaign/CampaignFacadeEjb.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,11 @@ public Campaign fromDto(@NotNull CampaignDto source) {
190190

191191
private void validate(CampaignDto campaignDto) {
192192
final List<CampaignDashboardElement> campaignDashboardElements = campaignDto.getCampaignDashboardElements();
193-
for (CampaignDashboardElement cde : campaignDashboardElements) {
194-
if (cde.getDiagramId() == null || cde.getTabId() == null || cde.getWidth() == null || cde.getHeight() == null || cde.getOrder() == null) {
195-
throw new ValidationRuntimeException(I18nProperties.getValidationError(Validations.campaignDashboardChartValueNull));
193+
if (campaignDashboardElements != null) {
194+
for (CampaignDashboardElement cde : campaignDashboardElements) {
195+
if (cde.getDiagramId() == null || cde.getTabId() == null || cde.getWidth() == null || cde.getHeight() == null || cde.getOrder() == null) {
196+
throw new ValidationRuntimeException(I18nProperties.getValidationError(Validations.campaignDashboardChartValueNull));
197+
}
196198
}
197199
}
198200
}

0 commit comments

Comments
 (0)