← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13907: Null check in get meta data action

 

------------------------------------------------------------
revno: 13907
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-01-31 17:34:55 +0200
message:
  Null check in get meta data action
modified:
  dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/GetMetaDataAction.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-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/GetMetaDataAction.java'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/GetMetaDataAction.java	2013-12-20 22:02:12 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/GetMetaDataAction.java	2014-01-31 15:34:55 +0000
@@ -235,12 +235,18 @@
         
         for ( DataSet dataSet : dataSets )
         {
-            categoryComboSet.add( dataSet.getCategoryCombo() );
+            if ( dataSet.getCategoryCombo() != null )
+            {
+                categoryComboSet.add( dataSet.getCategoryCombo() );
+            }
         }
         
         for ( DataElementCategoryCombo categoryCombo : categoryComboSet )
         {
-            categorySet.addAll( categoryCombo.getCategories() );
+            if ( categoryCombo.getCategories() != null )
+            {
+                categorySet.addAll( categoryCombo.getCategories() );
+            }
         }
         
         categoryCombos = new ArrayList<DataElementCategoryCombo>( categoryComboSet );