Fix deleting an account that was never connected

Fixes #8951
This commit is contained in:
Philipp Hörist 2018-03-17 00:20:11 +01:00
parent 8f2bc1e1c6
commit d8777a78aa
1 changed files with 6 additions and 2 deletions

View File

@ -1104,8 +1104,12 @@ class Logger:
:param account_jid: The jid of the account
"""
jid_id = self.get_jid_id(account_jid)
try:
jid_id = self.get_jid_id(account_jid)
except ValueError:
# This happens if the JID never made it to the Database
# because the account was never connected
return
sql = '''
DELETE FROM roster_entry WHERE account_jid_id = {jid_id};