tiny work

This commit is contained in:
zema1 2017-11-01 18:35:27 +08:00
parent 91d17bd3e8
commit 225d68b413

View File

@ -173,7 +173,7 @@ class ProblemAPI(APIView):
except Problem.DoesNotExist:
return self.error("Problem does not exist")
problems = Problem.objects.all().order_by("-create_time")
problems = Problem.objects.filter(contest_id__isnull=True).order_by("-create_time")
if not user.can_mgmt_all_problem():
problems = problems.filter(created_by=user)
keyword = request.GET.get("keyword")