fix: Typo in save data
All checks were successful
Build Docker / Build SLDs Image (push) Successful in 18s
Build Docker / Build Main Image (push) Successful in 19s

This commit is contained in:
Nathan Woodburn 2023-11-08 20:45:37 +11:00
parent a0bb9dc032
commit c0193337bb
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

4
db.py
View File

@ -109,12 +109,12 @@ def get_website_data(domain):
return "" return ""
return data[0][2] return data[0][2]
def update_website_data(domain): def update_website_data(domain,data):
connection = mysql.connector.connect(**dbargs) connection = mysql.connector.connect(**dbargs)
cursor = connection.cursor() cursor = connection.cursor()
cursor.execute(""" cursor.execute("""
UPDATE site SET data = %s WHERE domain = %s UPDATE site SET data = %s WHERE domain = %s
""", (domain, domain)) """, (data, domain))
connection.commit() connection.commit()
cursor.close() cursor.close()
connection.close() connection.close()