- 替换 Field(max_length=X) 为 StrX/TextX 类型别名(21 个 sqlmodels 文件) - 替换 get + 404 检查为 get_exist_one()(17 个路由文件,约 50 处) - 替换 save + session.refresh 为 save(load=...) - 替换 session.add + commit 为 save()(dav/provider.py) - 更新所有依赖至最新版本 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -155,9 +155,7 @@ async def router_admin_delete_share(
|
||||
:param share_id: 分享ID
|
||||
:return: 删除结果
|
||||
"""
|
||||
share = await Share.get(session, Share.id == share_id)
|
||||
if not share:
|
||||
raise HTTPException(status_code=404, detail="分享不存在")
|
||||
share = await Share.get_exist_one(session, share_id)
|
||||
|
||||
await Share.delete(session, share)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user