Logger: only search if ids are available

This commit is contained in:
Philipp Hörist 2017-11-08 22:27:37 +01:00
parent 47f4838c7c
commit 35d2beae74
1 changed files with 3 additions and 0 deletions

View File

@ -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