fix: Site data autocreation when visiting an unclaimed domain
This commit is contained in:
parent
0ca9a8ac91
commit
d54d91f6a4
11
sites/db.py
11
sites/db.py
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user