Skip to content

Commit

Permalink
move updateDatasetUser past the file updates
Browse files Browse the repository at this point in the history
it apparently causes new datafiles, which don't have create dates to
start to be persisted, cause a failure with an sql insert to the dataset
table with a null createdate. Moving it back to this location assures
the datafiles have create dates and avoids the exception. It's not clear
to me why trying to get the authenticatedUser in the updateDatasetUser()
call causes this.
  • Loading branch information
qqmyers committed Sep 27, 2024
1 parent 5e1540d commit 3742fd3
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,7 @@ public Dataset execute(CommandContext ctxt) throws CommandException {
}
//Get or create (currently only when called with fmVarMet != null) a new edit version
DatasetVersion editVersion = theDataset.getOrCreateEditVersion(fmVarMet);
//Update the DatasetUser (which merges it into the context)
updateDatasetUser(ctxt);


//Will throw an IllegalCommandException if a system metadatablock is changed and the appropriate key is not supplied.
checkSystemMetadataKeyIfNeeded(editVersion,persistedVersion);
Expand Down Expand Up @@ -261,7 +260,8 @@ public Dataset execute(CommandContext ctxt) throws CommandException {

theDataset.setModificationTime(getTimestamp());


//Update the DatasetUser (which merges it into the context)
updateDatasetUser(ctxt);

if (clone != null) {
AuthenticatedUser au = (AuthenticatedUser) getUser();
Expand Down

0 comments on commit 3742fd3

Please sign in to comment.