Update db.py

Just making sure points is not `None` (when it is not possible to get the number of points for example)
This commit is contained in:
Augustin 2023-02-13 19:29:54 +01:00 committed by GitHub
parent 3770fa6451
commit 05b88945ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 32 additions and 29 deletions

View File

@ -33,6 +33,9 @@ def get_row(compte, points, mycursor, same_points = True): #return if there is a
def add_to_database(compte, points, sql_host,sql_usr,sql_pwd,sql_database, save_if_fail=True):
if points is None:
pass
else:
try:
mydb = mysql.connector.connect(
host=sql_host,