Skip to content

Commit facfae5

Browse files
committed
fix(api): 修复 API 模式搜索接口多页数据报错的问题
1 parent 387a011 commit facfae5

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

docs/Release_Notes.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
**更新内容:**
22

33
1. API 模式搜索接口增加 `offset``count` 参数
4-
2. 修复 API 模式搜索接口结果为空报错的问题
5-
3. 服务器模式默认启用局域网访问
6-
4. 更新数据接口请求参数
4+
2. 修复 API 模式搜索接口多页数据报错的问题
5+
3. 修复 API 模式搜索接口结果为空报错的问题
6+
4. 服务器模式默认启用局域网访问
7+
5. 更新数据接口请求参数

src/interface/search.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ def generate_filter_selected(
227227
},
228228
separators=(",", ":"),
229229
)
230+
return None
230231

231232
def generate_search_filter_value(
232233
self,
@@ -244,6 +245,7 @@ def generate_search_filter_value(
244245
},
245246
separators=(",", ":"),
246247
)
248+
return None
247249

248250
def _generate_params_general(
249251
self,
@@ -367,7 +369,8 @@ def check_response(
367369
self.log.warning(error_text)
368370
self.finished = True
369371
elif len(d) == 0:
370-
self.response.append([])
372+
if not self.response:
373+
self.response.append([])
371374
self.finished = True
372375
else:
373376
self.offset = data_dict[cursor]

0 commit comments

Comments
 (0)