Skip to content

Commit

Permalink
Fix db constraint violation
Browse files Browse the repository at this point in the history
  • Loading branch information
janvanmansum committed Nov 19, 2024
1 parent 5fa12a9 commit eab4122
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,16 +202,17 @@ public Dataset execute(CommandContext ctxt) throws CommandException {

DatasetFieldUtil.tidyUpFields(editVersion.getDatasetFields(), true);

registerExternalVocabValuesIfAny(ctxt, editVersion, cvocSetting);

//Set creator and create date for files if needed
for (DataFile dataFile : theDataset.getFiles()) {
if (dataFile.getCreateDate() == null) {
dataFile.setCreateDate(getTimestamp());
dataFile.setCreator((AuthenticatedUser) getUser());
ctxt.em().merge(dataFile);
}
}

registerExternalVocabValuesIfAny(ctxt, editVersion, cvocSetting);

// Remove / delete any files that were removed

// If any of the files that we are deleting has a UNF, we will need to
Expand Down

0 comments on commit eab4122

Please sign in to comment.