]> git.mxchange.org Git - fba.git/commitdiff
Fixing instance fetcher inserting duplicate rows
authorMint <>
Sun, 7 Aug 2022 06:24:20 +0000 (09:24 +0300)
committerMint <>
Sun, 7 Aug 2022 06:24:20 +0000 (09:24 +0300)
fetch_instances.py

index c59d7fa33927a887bcf928aadabb561410901bf5..14333985a8fe9dafccf050bbeffdcc73b9359aa3 100644 (file)
@@ -55,6 +55,9 @@ for instance in peerlist:
     instance = instance.lower()
     print(instance)
     try:
+        c.execute(
+            "select domain from instances where domain = ?", (instance,)
+        )
         if c.fetchone() == None:
             c.execute(
                 "insert into instances select ?, ?, ?",