Skip to content

Commit

Permalink
#3599 flip found boolean for single value
Browse files Browse the repository at this point in the history
  • Loading branch information
sekmiller committed Jun 22, 2018
1 parent 882566c commit 8e14c73
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/edu/harvard/iq/dataverse/api/Datasets.java
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ private Response processDatasetFieldDataDelete(String jsonBody, String id, Datav
boolean found = false;
for (DatasetField dsf : dsv.getDatasetFields()) {
if (dsf.getDatasetFieldType().equals(updateField.getDatasetFieldType())) {
if (dsf.getDatasetFieldType().isAllowMultiples()) {
if (dsf.getDatasetFieldType().isAllowMultiples()) {
if (updateField.getDatasetFieldType().isControlledVocabulary()) {
if (dsf.getDatasetFieldType().isAllowMultiples()) {
for (ControlledVocabularyValue cvv : updateField.getControlledVocabularyValues()) {
Expand Down Expand Up @@ -511,6 +511,10 @@ private Response processDatasetFieldDataDelete(String jsonBody, String id, Datav
}
}
}
} else {
found = true;
dsf.setSingleValue(null);
dsf.setSingleControlledVocabularyValue(null);
}
break;
}
Expand Down

0 comments on commit 8e14c73

Please sign in to comment.