]> git.ipfire.org Git - pbs.git/commitdiff
jobs: Fix quota calculation for release builds
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 19 Oct 2023 10:34:08 +0000 (10:34 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 19 Oct 2023 10:34:08 +0000 (10:34 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/buildservice/jobs.py

index 6ccb2f3e8e63362342034e3c53d8f3246694e826..b2bb65816cf3cb676a485cae3f29bd06aafb6edd 100644 (file)
@@ -58,9 +58,14 @@ WITH_JOB_QUEUE_CTE = """
                        jobs.finished_at IS NULL
                AND
                        jobs.installcheck_succeeded IS TRUE
+
                -- Remove any jobs from users that have exceeded their quota
                AND
-                       NOT builds.owner_id IN (SELECT user_id FROM users_with_exceeded_quotas)
+                       (
+                               builds.owner_id IS NULL
+                       OR
+                               NOT builds.owner_id IN (SELECT user_id FROM users_with_exceeded_quotas)
+                       )
                ORDER BY
                        _rank
        )