mirror of
				https://gitea.augustin64.fr/piair/MsRewards-Reborn.git
				synced 2025-11-03 23:23:53 +01:00 
			
		
		
		
	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:
		@@ -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):
 | 
					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:
 | 
					        try:
 | 
				
			||||||
            mydb = mysql.connector.connect(
 | 
					            mydb = mysql.connector.connect(
 | 
				
			||||||
                host=sql_host,
 | 
					                host=sql_host,
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user