[Bug fix] DatasetProfileManager.java: In method "createNewVersionDatasetProfile()", do not set label and language from oldDatasetProfile.

This commit is contained in:
Konstantina Galouni 2022-05-31 16:51:59 +03:00
parent d7ee7b8d93
commit 79bc95b099
1 changed files with 2 additions and 2 deletions

View File

@ -285,10 +285,10 @@ public class DatasetProfileManager {
if (latestVersionDatasetProfile.getVersion().equals(oldDatasetProfile.getVersion())){
eu.eudat.models.data.admin.composite.DatasetProfile sortedProfile = profile.toShort();
eu.eudat.data.entities.DatasetProfile modelDefinition = AdminManager.generateViewStyleDefinition(sortedProfile, apiContext);
modelDefinition.setLabel(oldDatasetProfile.getLabel());
// modelDefinition.setLabel(oldDatasetProfile.getLabel());
modelDefinition.setVersion((short) (oldDatasetProfile.getVersion() + 1));
modelDefinition.setGroupId(oldDatasetProfile.getGroupId());
modelDefinition.setLanguage(oldDatasetProfile.getLanguage());
// 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);