diff --git a/src/main/java/edu/harvard/iq/dataverse/engine/command/impl/UpdateDatasetVersionCommand.java b/src/main/java/edu/harvard/iq/dataverse/engine/command/impl/UpdateDatasetVersionCommand.java index 49ff13a573d..531a4976799 100644 --- a/src/main/java/edu/harvard/iq/dataverse/engine/command/impl/UpdateDatasetVersionCommand.java +++ b/src/main/java/edu/harvard/iq/dataverse/engine/command/impl/UpdateDatasetVersionCommand.java @@ -108,7 +108,9 @@ public Dataset execute(CommandContext ctxt) throws CommandException { cvocSetting = ctxt.settings().getValueForKey(SettingsServiceBean.Key.CVocConf); Dataset theDataset = getDataset(); - theDataset.getFiles(); + for(DataFile f:theDataset.getFiles()) { + f.getLatestFileMetadata(); + } theDataset.getLatestVersion().getFileMetadatas(); //logger.info("Dataset fmd " + theDataset.getFiles().get(0).getLatestFileMetadata().getId() + " is restricted: " + theDataset.getFiles().get(0).getLatestFileMetadata().isRestricted()); //logger.info("Dataset latest version fmd " + theDataset.getLatestVersion().getFileMetadatas().get(0).getId() + " is restricted: " + theDataset.getLatestVersion().getFileMetadatas().get(0).isRestricted());