]> git.mxchange.org Git - fba.git/commitdiff
One more case insensitivity fix
authorMint <>
Sun, 7 Aug 2022 11:50:38 +0000 (14:50 +0300)
committerMint <>
Sun, 7 Aug 2022 11:50:38 +0000 (14:50 +0300)
fetch_blocks.py

index c178fafd671aee9707a312f8f13e1347807e5cbe..11a9b21382d33853d3a41bbd2929422d43c4f6e9 100644 (file)
@@ -132,6 +132,7 @@ for blocker, software in c.fetchall():
                     else {})}
                 ).items():
                     for blocked, reason in info.items():
+                        blocked == blocked.lower()
                         c.execute(
                             "update blocks set reason = ? where blocker = ? and blocked = ? and block_level = ?",
                             (reason["reason"], blocker, blocked, block_level),
@@ -145,8 +146,8 @@ for blocker, software in c.fetchall():
             json = get_mastodon_blocks(blocker)
             for block_level, blocks in json.items():
                 for instance in blocks:
-                    blocked == blocked.lower()
                     blocked, blocked_hash, reason = instance.values()
+                    blocked == blocked.lower()
                     if blocked.count("*") <= 1:
                         c.execute(
                             "select hash from instances where hash = ?", (blocked_hash,)