From 2d3919717427e2b5ab0c7775e31f889919a2c6ed Mon Sep 17 00:00:00 2001 From: "sonto.lau" Date: Sat, 7 Mar 2026 01:26:49 +0800 Subject: [PATCH] bug fix --- requirements_generator/core_utils.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/requirements_generator/core_utils.py b/requirements_generator/core_utils.py index ecd5a27..985d37d 100644 --- a/requirements_generator/core_utils.py +++ b/requirements_generator/core_utils.py @@ -48,12 +48,12 @@ def log_change( } changes_text = json.dumps(changes_payload, ensure_ascii=False, indent=2) + history = ChangeHistory(project_id=project_id, + changes=changes_text, + status=status) # ✅ 只传模型真实存在的字段 - return db.add_change_history( - project_id=project_id, - changes=changes_text, - status=status, - ) + db.create_change_history(history) + return history def get_change_histories(project_id: int, status: str = None) -> list[dict]: