Ahhhhhhhhhhhhhhhh

This commit is contained in:
bton 2024-03-13 19:29:15 +01:00
parent f6c06771dd
commit 657c500f24

View file

@ -5,7 +5,7 @@ from datetime import datetime
import click import click
from flask import current_app, g from flask import current_app, g
def log(statement, user_id=user_id, before=before, after=after, change=change): def log(statement, user_id=None, before=None, after=None, change=None):
db = get_db() db = get_db()
c = db.cursor() c = db.cursor()
c.execute("INSERT INTO transaction_log (timestamp, type, user_id, before, after, change) VALUES (?, ?, ?, ?, ?, ?)", [datetime.now(), statement, user_id, before, after, change]) c.execute("INSERT INTO transaction_log (timestamp, type, user_id, before, after, change) VALUES (?, ?, ?, ?, ?, ?)", [datetime.now(), statement, user_id, before, after, change])