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("""
|
cursor.execute("""
|
||||||
INSERT INTO entries (user_id, entrytype, ts, paid, comments)
|
INSERT INTO entries (user_id, entrytype, ts, paid, comments)
|
||||||
VALUES (?, ?, ?, ?, ?)
|
VALUES (?, ?, ?, ?, ?)
|
||||||
""", (user_id, entrytype, timestamp.isoformat(), False, comments))
|
""", (user_id, entry_type, timestamp.isoformat(), False, comments))
|
||||||
else:
|
else:
|
||||||
cursor.execute("""
|
cursor.execute("""
|
||||||
INSERT INTO entries (user_id, entrytype, ts, paid)
|
INSERT INTO entries (user_id, entrytype, ts, paid)
|
||||||
VALUES (?, ?, ?, ?)
|
VALUES (?, ?, ?, ?)
|
||||||
""", (user_id, entrytype, timestamp.isoformat(), False))
|
""", (user_id, entry_type, timestamp.isoformat(), False))
|
||||||
conn.commit()
|
conn.commit()
|
||||||
conn.close()
|
conn.close()
|
||||||
|
|
||||||
@@ -188,7 +188,7 @@ def index():
|
|||||||
default_end = parse_iso_datetime(end_date)
|
default_end = parse_iso_datetime(end_date)
|
||||||
else:
|
else:
|
||||||
for user in users:
|
for user in users:
|
||||||
total_hours, paid_hours = generate_report(
|
total_hours, paid_hours, actions = generate_report(
|
||||||
user["id"],
|
user["id"],
|
||||||
default_begin.isoformat(),
|
default_begin.isoformat(),
|
||||||
default_end.isoformat()
|
default_end.isoformat()
|
||||||
@@ -246,7 +246,7 @@ def api_create_entry():
|
|||||||
}), 400
|
}), 400
|
||||||
create_entry(
|
create_entry(
|
||||||
user_id,
|
user_id,
|
||||||
entrytype,
|
entry_type,
|
||||||
client_timestamp,
|
client_timestamp,
|
||||||
paid,
|
paid,
|
||||||
comments
|
comments
|
||||||
|
|||||||
@@ -162,9 +162,9 @@
|
|||||||
|
|
||||||
<td>
|
<td>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="textarea"
|
||||||
name="comments"
|
name="comments"
|
||||||
id="comments"
|
id="comments"
|
||||||
value=""
|
value=""
|
||||||
>
|
>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
Reference in New Issue
Block a user