Skip to content

Commit

Permalink
Final fix for resolving room mapping. Also applied this fix to category
Browse files Browse the repository at this point in the history
mappign in SDATA as well.
  • Loading branch information
bwssytems committed Aug 27, 2015
1 parent bd60d63 commit 937fb5d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/com/bwssystems/vera/VeraInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ private void denormalizeSdata(Sdata theSdata) {
Device theDevice = null;
while (theIterator.hasNext()) {
theDevice = theIterator.next();
if(theDevice.getRoom() != null)
if(theDevice.getRoom() != null && roomMap.get(theDevice.getRoom()) != null)
theDevice.setRoom(roomMap.get(theDevice.getRoom()).getName());
else
theDevice.setRoom("<unknown>");
if(theDevice.getCategory() != null)
theDevice.setRoom("no room");
if(theDevice.getCategory() != null && categoryMap.get(theDevice.getCategory()) != null)
theDevice.setCategory(categoryMap.get(theDevice.getCategory()).getName());
else
theDevice.setCategory("<unknown>");
Expand Down

0 comments on commit 937fb5d

Please sign in to comment.