]> git.ipfire.org Git - ipfire.org.git/commitdiff
fireinfo: When selecting a random profile don't try to show a deleted one
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 12 Jan 2024 16:11:33 +0000 (16:11 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 12 Jan 2024 16:11:33 +0000 (16:11 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/backend/fireinfo.py

index 1f459b8f50231aa2762b462d15821c7f0790f116..686c46a9baf68b22615c45bb8f9751b54cf21940 100644 (file)
@@ -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