Updated to keep on the same if statement

This commit is contained in:
Marcelo Moreira de Mello
2016-10-25 02:13:01 -04:00
parent c0e89631cc
commit 0e6a94aa0f

View File

@@ -117,8 +117,7 @@ class WUndergroundSensor(Entity):
else:
return self.rest.data[self._condition]
if self._condition == 'alerts':
if self.rest.alerts:
if self.rest.alerts and self._condition == 'alerts':
return len(self.rest.alerts)
else:
return 0