Skip to content

Commit 9ea2385

Browse files
committed
fix:修复无法新增部门的bug
1 parent 75f8d86 commit 9ea2385

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dash-fastapi-backend/module_admin/dao/dept_dao.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def add_dept_dao(cls, db: Session, dept: DeptModel):
197197
"""
198198
db_dept = SysDept(**dept.dict())
199199
db.add(db_dept)
200-
db.refresh(db_dept) # 刷新
200+
db.flush()
201201

202202
return db_dept
203203

0 commit comments

Comments
 (0)