From 6760f8b976c1a36117e7a94ab92cb82214f4a63c Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 16 Jun 2026 12:53:52 +0000 Subject: [PATCH] importer: Ignore any duplicates in Spamhaus' feeds Signed-off-by: Michael Tremer --- src/scripts/location-importer.in | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/scripts/location-importer.in b/src/scripts/location-importer.in index fb4dead..aad6889 100644 --- a/src/scripts/location-importer.in +++ b/src/scripts/location-importer.in @@ -2407,7 +2407,14 @@ class CLI(object): VALUES ( %s, %s, %s - )""", "%s" % network, name, True, + ) + ON CONFLICT + ( + network, source + ) + DO + NOTHING + """, "%s" % network, name, True, ) # Raise an exception if we could not import anything @@ -2460,7 +2467,14 @@ class CLI(object): VALUES ( %s, %s, %s - )""", "%s" % asn, name, True, + ) + ON CONFLICT + ( + number, source + ) + DO + NOTHING + """, "%s" % asn, name, True, ) @staticmethod -- 2.47.3