fix settings

This commit is contained in:
BennyThink 2022-02-18 20:49:20 +08:00
parent f25f719f7c
commit 9431a222f1
No known key found for this signature in database
GPG Key ID: 6CD0DBDA5235D481

View File

@ -65,7 +65,7 @@ def set_user_settings(user_id: int, field: "str", value: "str"):
if field == "method": if field == "method":
method = value method = value
resolution = "high" resolution = "high"
cur.execute("INSERT INTO settings VALUES (%s,%s,%s)", (user_id, resolution, method)) cur.execute("INSERT INTO settings VALUES (%s,%s,%s,%s)", (user_id, resolution, method, "Celery"))
else: else:
cur.execute(f"UPDATE settings SET {field} =%s WHERE user_id = %s", (value, user_id)) cur.execute(f"UPDATE settings SET {field} =%s WHERE user_id = %s", (value, user_id))
db.con.commit() db.con.commit()