dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #43237
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21961: Fixed bug with program getter
------------------------------------------------------------
revno: 21961
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2016-02-12 18:14:15 +0100
message:
Fixed bug with program getter
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.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-api/src/main/java/org/hisp/dhis/program/Program.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java 2016-02-12 16:51:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java 2016-02-12 17:14:15 +0000
@@ -234,7 +234,14 @@
*/
public List<TrackedEntityAttribute> getTrackedEntityAttributes()
{
- return programAttributes.stream().map( p -> p.getAttribute() ).collect( Collectors.toList() );
+ List<TrackedEntityAttribute> attributes = new ArrayList<>();
+
+ for ( ProgramTrackedEntityAttribute attribute : programAttributes )
+ {
+ attributes.add( attribute.getAttribute() );
+ }
+
+ return attributes;
}
/**
@@ -243,7 +250,7 @@
*/
public List<TrackedEntityAttribute> getNonConfidentialTrackedEntityAttributes()
{
- return programAttributes.stream().map( p -> p.getAttribute() ).filter( a -> !a.isConfidential() ).collect( Collectors.toList() );
+ return getTrackedEntityAttributes().stream().filter( a -> !a.isConfidential() ).collect( Collectors.toList() );
}
/**