← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 22085: fixes to UGA imports for dxf2 importer

 

------------------------------------------------------------
revno: 22085
committer: Morten Olav Hansen <morten@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2016-03-01 16:43:43 +0700
message:
  fixes to UGA imports for dxf2 importer
modified:
  dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/importers/DefaultIdentifiableObjectImporter.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-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/importers/DefaultIdentifiableObjectImporter.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/importers/DefaultIdentifiableObjectImporter.java	2016-03-01 09:01:25 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/importers/DefaultIdentifiableObjectImporter.java	2016-03-01 09:43:43 +0000
@@ -1174,13 +1174,8 @@
 
         private Set<UserGroupAccess> extractUserGroupAccesses( T object )
         {
-            Set<UserGroupAccess> userGroupAccesses = new HashSet<>();
-
-            if ( schema.havePersistedProperty( "userGroupAccesses" ) )
-            {
-                userGroupAccesses = ReflectionUtils.invokeGetterMethod( "userGroupAccesses", object );
-                ReflectionUtils.invokeSetterMethod( "userGroupAccesses", object, new HashSet<>() );
-            }
+            userGroupAccesses = object.getUserGroupAccesses();
+            object.setUserGroupAccesses( new HashSet<>() );
 
             return userGroupAccesses;
         }