Skip to content

Commit b330706

Browse files
committed
修复搜索词条时报错:AttributeError: id
原因是搜索时没有跳过 content_version 表
1 parent 5f20ce1 commit b330706

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,7 @@ nonebot_plugin_orm.exception.AutogenerateDiffsDetected: 检测到新的升级操
110110
......
111111
......
112112
```
113-
在控制台输入 `nb orm revision` 生成升级脚本,
114-
之后输入 `nb orm upgrade` 升级数据库。
113+
在控制台输入 `nb orm revision` 生成升级脚本,之后输入 `nb orm upgrade` 升级数据库。
115114

116115
### 基本命令
117116
```

src/nonebot_plugin_perithacus/cmd_search.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ async def _(
9393
# 遍历所有表
9494
try:
9595
for table_name in metadata.tables:
96+
if table_name == "content_version":
97+
continue
9698
# 获取表对象
9799
table = Table(table_name, metadata, autoload_with=engine)
98100
try:

0 commit comments

Comments
 (0)