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()
|
connection.close()
|
||||||
|
|
||||||
if data == []:
|
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 ""
|
return ""
|
||||||
|
|
||||||
parsed = data[0][2]
|
parsed = data[0][2]
|
||||||
|
Loading…
Reference in New Issue
Block a user