fix: Site data autocreation when visiting an unclaimed domain
All checks were successful
Build Docker / Build SLDs Image (push) Successful in 19s
Build Docker / Build Main Image (push) Successful in 20s

This commit is contained in:
Nathan Woodburn 2023-11-16 15:25:48 +11:00
parent 0ca9a8ac91
commit d54d91f6a4
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

View File

@ -45,17 +45,6 @@ def get_website_data_raw(domain):
connection.close()
if data == []:
# Create new entry
connection = mysql.connector.connect(**dbargs)
cursor = connection.cursor()
data = {
"data": ""
}
insert_query = "INSERT INTO site (data,domain) VALUES (%s,%s)"
cursor.execute(insert_query, (json.dumps(data), domain))
connection.commit()
cursor.close()
connection.close()
return ""
parsed = data[0][2]