Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
coco
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
coco
Commits
0ad0a272
Commit
0ad0a272
authored
Jan 09, 2018
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Bugfix] 解决直接输入数字bug
parent
34707885
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
interactive.py
coco/interactive.py
+2
-3
No files found.
coco/interactive.py
View file @
0ad0a272
...
@@ -134,9 +134,8 @@ class InteractiveServer:
...
@@ -134,9 +134,8 @@ 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
]]
# 全匹配到则直接返回全匹配的
# 全匹配到则直接返回全匹配的
if
len
(
result
)
==
0
:
if
len
(
result
)
==
0
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment