mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2024-12-29 16:41:56 +00:00
fix search problem
This commit is contained in:
parent
4dc1e2687b
commit
7d1f9452cf
@ -67,7 +67,7 @@ class ProblemAPI(APIView):
|
||||
# 搜索的情况
|
||||
keyword = request.GET.get("keyword", "").strip()
|
||||
if keyword:
|
||||
problems = problems.filter(Q(title__contains=keyword) | Q(description__contains=keyword))
|
||||
problems = problems.filter(Q(title__icontains=keyword) | Q(_id__icontains=keyword))
|
||||
|
||||
# 难度筛选
|
||||
difficulty = request.GET.get("difficulty")
|
||||
|
Loading…
Reference in New Issue
Block a user