db - check if table exists
This commit is contained in:
parent
3900115d6a
commit
c46801c183
@ -561,6 +561,7 @@ class Profile(Contact, Singleton):
|
||||
if num is not None:
|
||||
friend = self._friends[num]
|
||||
friend.clear_corr()
|
||||
if self._history.friend_exists_in_db(friend.tox_id):
|
||||
self._history.delete_messages(friend.tox_id)
|
||||
self._history.delete_friend_from_db(friend.tox_id)
|
||||
else: # clear all history
|
||||
@ -648,6 +649,7 @@ class Profile(Contact, Singleton):
|
||||
"""
|
||||
friend = self._friends[num]
|
||||
self.clear_history(num)
|
||||
if self._history.friend_exists_in_db(friend.tox_id):
|
||||
self._history.delete_friend_from_db(friend.tox_id)
|
||||
self._tox.friend_delete(friend.number)
|
||||
del self._friends[num]
|
||||
|
Loading…
Reference in New Issue
Block a user