This commit is contained in:
sonto.lau 2026-03-07 01:26:49 +08:00
parent 3d055b74ea
commit 2d39197174
1 changed files with 5 additions and 5 deletions

View File

@ -48,12 +48,12 @@ def log_change(
}
changes_text = json.dumps(changes_payload, ensure_ascii=False, indent=2)
# ✅ 只传模型真实存在的字段
return db.add_change_history(
project_id=project_id,
history = ChangeHistory(project_id=project_id,
changes=changes_text,
status=status,
)
status=status)
# ✅ 只传模型真实存在的字段
db.create_change_history(history)
return history
def get_change_histories(project_id: int, status: str = None) -> list[dict]: