another quick fix

This commit is contained in:
dan63047 2022-04-10 15:18:05 +03:00
parent b234a841d0
commit cc109af0cf
1 changed files with 2 additions and 0 deletions

View File

@ -162,6 +162,8 @@ class Database_worker():
with open("data.json", "r") as data:
self._DATA_DIST = json.load(data)
data.close()
if not self._DATA_DIST['users'].get(str(from_id)):
self.set_new_user(str(from_id))
return self._DATA_DIST['users'][str(from_id)]
try:
cur = self._CON.cursor()