From f189b7faac96ffc2425811dd7be9eb2d4226eb50 Mon Sep 17 00:00:00 2001 From: Akihiko Kuroda Date: Thu, 23 Nov 2023 11:57:31 -0500 Subject: [PATCH] restore fix --- gateway/api/jobhandler.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gateway/api/jobhandler.py b/gateway/api/jobhandler.py index 204cd12a9..98ad88210 100644 --- a/gateway/api/jobhandler.py +++ b/gateway/api/jobhandler.py @@ -32,6 +32,8 @@ def throttle_job(job): queued_job = Job.objects.filter( status=Job.QUEUED, author__exact=job.author ).order_by("created")[:1] + if queued_job.count() == 0: + return None return queued_job[0]