mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2025-11-04 14:49:58 +08:00
fix(style): code style
This commit is contained in:
parent
515f422a2d
commit
0566b2856e
@ -1,7 +1,7 @@
|
|||||||
import hashlib
|
import hashlib
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import shutil
|
# import shutil
|
||||||
import tempfile
|
import tempfile
|
||||||
import zipfile
|
import zipfile
|
||||||
from wsgiref.util import FileWrapper
|
from wsgiref.util import FileWrapper
|
||||||
|
|||||||
@ -10,7 +10,7 @@ from contest.models import ContestRuleType
|
|||||||
class ProblemTagAPI(APIView):
|
class ProblemTagAPI(APIView):
|
||||||
def get(self, request):
|
def get(self, request):
|
||||||
qs = ProblemTag.objects
|
qs = ProblemTag.objects
|
||||||
keyword = request.GET.get('keyword')
|
keyword = request.GET.get("keyword")
|
||||||
if keyword:
|
if keyword:
|
||||||
qs = ProblemTag.objects.filter(name__icontains=keyword)
|
qs = ProblemTag.objects.filter(name__icontains=keyword)
|
||||||
tags = qs.annotate(problem_count=Count("problem")).filter(problem_count__gt=0)
|
tags = qs.annotate(problem_count=Count("problem")).filter(problem_count__gt=0)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user