Fix issue of not keeping dataset template users after version update
This commit is contained in:
parent
91f98a8759
commit
5a70ce7602
|
@ -291,6 +291,8 @@ public class DatasetProfileManager {
|
||||||
modelDefinition.setGroupId(oldDatasetProfile.getGroupId());
|
modelDefinition.setGroupId(oldDatasetProfile.getGroupId());
|
||||||
modelDefinition.setLanguage(oldDatasetProfile.getLanguage());
|
modelDefinition.setLanguage(oldDatasetProfile.getLanguage());
|
||||||
apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().createOrUpdate(modelDefinition);
|
apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().createOrUpdate(modelDefinition);
|
||||||
|
eu.eudat.data.entities.DatasetProfile datasetProfile = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().createOrUpdate(modelDefinition);
|
||||||
|
this.storeDatasetProfileUsers(datasetProfile, profile);
|
||||||
return modelDefinition;
|
return modelDefinition;
|
||||||
} else {
|
} else {
|
||||||
throw new DatasetProfileNewVersionException("Version to update not the latest.");
|
throw new DatasetProfileNewVersionException("Version to update not the latest.");
|
||||||
|
|
Loading…
Reference in New Issue