帐号治理-项目治理--初步优化

This commit is contained in:
Cheng Zhou
2025-12-18 16:58:12 +08:00
parent a4ad087a0a
commit f6b89cb8c4
22 changed files with 30 additions and 29 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
import uuid
from typing import Sequence
from sqlalchemy import select, update
from sqlalchemy import select, update as sa_update
from sqlalchemy.ext.asyncio import AsyncSession
from app.models.study import Study
@@ -38,7 +38,7 @@ async def update(db: AsyncSession, study: Study, study_in: StudyUpdate) -> Study
update_data = study_in.model_dump(exclude_unset=True)
if update_data:
await db.execute(
update(Study)
sa_update(Study)
.where(Study.id == study.id)
.values(**update_data)
)