Merge dev to main: Security improvements and comprehensive test infrastructure #39

Merged
jimmy merged 195 commits from dev into main 2026-04-08 01:42:27 +08:00
Showing only changes of commit 9f2cd7cab2 - Show all commits
+7 -1
View File
@@ -258,11 +258,17 @@ async def create_task(
task = dict(row)
task["tags"] = json.loads(task["tags"]) if task["tags"] else []
# Convert datetime objects to ISO format strings for JSON serialization
task_for_history = task.copy()
for key in ["created_at", "updated_at", "completed_at", "due_date"]:
if task_for_history.get(key):
task_for_history[key] = task_for_history[key].isoformat()
# Log history
await conn.execute("""
INSERT INTO task_history (task_id, action, actor, actor_type, new_value)
VALUES ($1, $2, $3, $4, $5)
""", task["id"], "created", actor, "human", json.dumps(task))
""", task["id"], "created", actor, "human", json.dumps(task_for_history))
return task