帐号治理-项目治理--初步优化
This commit is contained in:
@@ -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)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user