=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/AbstractNameableObject.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/AbstractNameableObject.java 2011-09-07 11:42:48 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/AbstractNameableObject.java 2011-09-11 16:28:43 +0000 @@ -135,6 +135,8 @@ String code = object.getCode(); int internalId = object.getId(); + if (code == null) continue; + // NOTE: its really not good that duplicate codes are possible // Best we can do here is severe log and remove the item if ( map.containsKey( code ) )