Fix some bugs that Qwen missed
This commit is contained in:
8
app.py
8
app.py
@@ -69,12 +69,12 @@ def create_entry(user_id, entry_type, client_timestamp=None, comments=None):
|
||||
cursor.execute("""
|
||||
INSERT INTO entries (user_id, entrytype, ts, paid, comments)
|
||||
VALUES (?, ?, ?, ?, ?)
|
||||
""", (user_id, entrytype, timestamp.isoformat(), False, comments))
|
||||
""", (user_id, entry_type, timestamp.isoformat(), False, comments))
|
||||
else:
|
||||
cursor.execute("""
|
||||
INSERT INTO entries (user_id, entrytype, ts, paid)
|
||||
VALUES (?, ?, ?, ?)
|
||||
""", (user_id, entrytype, timestamp.isoformat(), False))
|
||||
""", (user_id, entry_type, timestamp.isoformat(), False))
|
||||
conn.commit()
|
||||
conn.close()
|
||||
|
||||
@@ -188,7 +188,7 @@ def index():
|
||||
default_end = parse_iso_datetime(end_date)
|
||||
else:
|
||||
for user in users:
|
||||
total_hours, paid_hours = generate_report(
|
||||
total_hours, paid_hours, actions = generate_report(
|
||||
user["id"],
|
||||
default_begin.isoformat(),
|
||||
default_end.isoformat()
|
||||
@@ -246,7 +246,7 @@ def api_create_entry():
|
||||
}), 400
|
||||
create_entry(
|
||||
user_id,
|
||||
entrytype,
|
||||
entry_type,
|
||||
client_timestamp,
|
||||
paid,
|
||||
comments
|
||||
|
||||
@@ -162,7 +162,7 @@
|
||||
|
||||
<td>
|
||||
<input
|
||||
type="text"
|
||||
type="textarea"
|
||||
name="comments"
|
||||
id="comments"
|
||||
value=""
|
||||
|
||||
Reference in New Issue
Block a user