Commit ba7c2e3a authored by Philipp Hörist's avatar Philipp Hörist

[omemo] Return None on empty result

parent 2cadb609
......@@ -53,8 +53,7 @@ class LiteSessionStore(SessionStore):
c = self.dbConn.cursor()
c.execute(q, (device_id, ))
result = c.fetchone()
return result[0]
return result[0] if result else None
def getActiveDeviceTuples(self):
q = "SELECT recipient_id, device_id FROM sessions WHERE active = 1"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment