dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #43916
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 22278: User setting service, get all user settings. Removed fall back to system settings for now. The fa...
------------------------------------------------------------
revno: 22278
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2016-03-13 15:27:28 +0100
message:
User setting service, get all user settings. Removed fall back to system settings for now. The fake user settings caused Hibernate exceptions since we got two objects with the same Hibernate primary key in session. User settings use user + name as primary key.
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultUserSettingService.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultUserSettingService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultUserSettingService.java 2016-03-13 14:11:35 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultUserSettingService.java 2016-03-13 14:27:28 +0000
@@ -216,19 +216,7 @@
return new ArrayList<>();
}
- List<UserSetting> list = userSettingStore.getAllUserSettings( user );
-
- return list.stream().map( userSetting -> {
- if ( userSetting.getValue() == null )
- {
- return new UserSetting( userSetting.getUser(), userSetting.getName(),
- systemSettingManager.getSystemSetting( NAME_SETTING_KEY_MAP.get( userSetting.getName() ) ) );
- }
- else
- {
- return userSetting;
- }
- } ).collect( Collectors.toList() );
+ return userSettingStore.getAllUserSettings( user );
}
@Override
@@ -266,7 +254,6 @@
{
return result;
}
-
}
catch ( ExecutionException ignored )
{