立项配置页初步优化

This commit is contained in:
Cheng Zhou
2026-02-24 16:53:22 +08:00
parent 0693f09b1d
commit 8f3f717e48
124 changed files with 12519 additions and 2954 deletions
+6 -2
View File
@@ -17,6 +17,7 @@ async def log_action(
detail: str | None,
operator_id: uuid.UUID,
operator_role: str,
auto_commit: bool = True,
) -> AuditLog:
log = AuditLog(
study_id=study_id,
@@ -28,8 +29,11 @@ async def log_action(
operator_role=operator_role,
)
db.add(log)
await db.commit()
await db.refresh(log)
if auto_commit:
await db.commit()
await db.refresh(log)
else:
await db.flush()
return log