Fix issue of not keeping dataset template users after version update

This commit is contained in:
George Kalampokis 2022-01-13 13:26:30 +02:00
parent 91f98a8759
commit 5a70ce7602
1 changed files with 2 additions and 0 deletions

View File

@ -291,6 +291,8 @@ public class DatasetProfileManager {
modelDefinition.setGroupId(oldDatasetProfile.getGroupId());
modelDefinition.setLanguage(oldDatasetProfile.getLanguage());
apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().createOrUpdate(modelDefinition);
eu.eudat.data.entities.DatasetProfile datasetProfile = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().createOrUpdate(modelDefinition);
this.storeDatasetProfileUsers(datasetProfile, profile);
return modelDefinition;
} else {
throw new DatasetProfileNewVersionException("Version to update not the latest.");