From 35d2beae7409025c3c6a9fa193ab264eefd09230 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Wed, 8 Nov 2017 22:27:37 +0100 Subject: [PATCH] Logger: only search if ids are available --- gajim/common/logger.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gajim/common/logger.py b/gajim/common/logger.py index d742e2322..f9776d9b1 100644 --- a/gajim/common/logger.py +++ b/gajim/common/logger.py @@ -1098,6 +1098,9 @@ class Logger: if origin_id is not None: ids.append(origin_id) + if not ids: + return False + sql = ''' SELECT stanza_id FROM logs WHERE stanza_id IN ({values}) LIMIT 1