core: fixed presence cache error

This commit is contained in:
Goffi 2012-12-06 22:11:41 +01:00
commit ead8ac7ebd

View file

@ -711,8 +711,8 @@ class Memory:
return {}
entities_presence = {}
for entity in self.entitiesCache[profile]:
# if entity exists, "presence" key must exist
entities_presence[entity] = self.entitiesCache[profile][entity]["presence"]
if "presence" in self.entitiesCache[profile][entity]:
entities_presence[entity] = self.entitiesCache[profile][entity]["presence"]
debug ("Memory getPresenceStatus (%s)", entities_presence)
return entities_presence