From: Michael Tremer Date: Fri, 12 Jan 2024 16:11:33 +0000 (+0000) Subject: fireinfo: When selecting a random profile don't try to show a deleted one X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c42a5ef6097df3898409a1e1725d8bd865c02d7b;p=ipfire.org.git fireinfo: When selecting a random profile don't try to show a deleted one Signed-off-by: Michael Tremer --- diff --git a/src/backend/fireinfo.py b/src/backend/fireinfo.py index 1f459b8f..686c46a9 100644 --- a/src/backend/fireinfo.py +++ b/src/backend/fireinfo.py @@ -939,6 +939,8 @@ class Fireinfo(Object): OR expired_at > %s ) + AND + blob IS NOT NULL ORDER BY RANDOM() LIMIT @@ -953,6 +955,8 @@ class Fireinfo(Object): fireinfo WHERE expired_at IS NULL + AND + blob IS NOT NULL ORDER BY RANDOM() LIMIT