]> git.ipfire.org Git - ipfire.org.git/commitdiff
analytics: Preset bot variable
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 12 Jan 2024 14:17:56 +0000 (14:17 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 12 Jan 2024 14:17:56 +0000 (14:17 +0000)
If there is no user-agent, it could happen that bot is not assigned
anything.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/backend/analytics.py

index 274181aeb775bbf3aaaad2c0918f30442799d3a9..34da983a0624761ba1acad31389b9752919978c6 100644 (file)
@@ -25,7 +25,7 @@ class Analytics(misc.Object):
                """
                        Logs a unique visit to this a page
                """
-               asn, query_args = None, None
+               asn, query_args, bot = None, None, False
 
                if referrer:
                        # Parse referrer