Commit 0ad0a272 authored by ibuler's avatar ibuler

[Bugfix] 解决直接输入数字bug

parent 34707885
...@@ -134,8 +134,7 @@ class InteractiveServer: ...@@ -134,8 +134,7 @@ class InteractiveServer:
if q == '': if q == '':
result = self.assets result = self.assets
# 用户输入的是数字,可能想使用id唯一键搜索 # 用户输入的是数字,可能想使用id唯一键搜索
elif q.isdigit(): elif q.isdigit() and self.search_result and len(self.search_result) >= int(q):
if len(self.search_result) >= int(q):
result = [self.search_result[int(q) - 1]] result = [self.search_result[int(q) - 1]]
# 全匹配到则直接返回全匹配的 # 全匹配到则直接返回全匹配的
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment