Queer European MD passionate about IT
Browse Source

TypeError bug fixed

Davte 4 years ago
parent
commit
995bfee084
2 changed files with 2 additions and 2 deletions
  1. 1 1
      davtelepot/__init__.py
  2. 1 1
      davtelepot/useful_tools.py

+ 1 - 1
davtelepot/__init__.py

@@ -11,7 +11,7 @@ __author__ = "Davide Testa"
 __email__ = "davide@davte.it"
 __credits__ = ["Marco Origlia", "Nick Lee @Nickoala"]
 __license__ = "GNU General Public License v3.0"
-__version__ = "2.5.20"
+__version__ = "2.5.21"
 __maintainer__ = "Davide Testa"
 __contact__ = "t.me/davte"
 

+ 1 - 1
davtelepot/useful_tools.py

@@ -362,7 +362,7 @@ async def calculate_session(bot: Bot,
     record = bot.db['calculations'].find_one(
         id=record_id
     )
-    old_expression = record['expression']
+    old_expression = record['expression'] or ''
     if record is None:
         logging.error("Invalid record identifier!")
         return