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

Commit 3c11d5e

Browse files
author
Martin Wahnschaffe
committed
Update CampaignFormDataImporter.java
SORMAS-Foundation#3005 also convert from true/false
1 parent 6bae1ca commit 3c11d5e

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

sormas-ui/src/main/java/de/symeda/sormas/ui/campaign/importer/CampaignFormDataImporter.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,12 @@ private void insertImportRowIntoData(CampaignFormDataDto campaignFormData, Strin
240240

241241
// Convert yes/no values to true/false
242242
if (CampaignFormElementType.YES_NO.toString().equals(existingFormElement.get().getType())) {
243-
if ("yes".equals(formEntry.getValue())) {
243+
String value = formEntry.getValue().toString();
244+
if ("yes".equalsIgnoreCase(value)
245+
|| "true".equalsIgnoreCase(value)) {
244246
formEntry.setValue(true);
245-
} else if ("no".equals(formEntry.getValue())) {
247+
} else if ("no".equalsIgnoreCase(value)
248+
|| "false".equalsIgnoreCase(value)) {
246249
formEntry.setValue(false);
247250
}
248251
}

0 commit comments

Comments
 (0)