From 1042baa7bfbd758b96fec827e53bddee14e5d106 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 12 Mar 2024 11:14:13 +0000 Subject: [PATCH] importer: Currently update the source when encountering a conflict Signed-off-by: Michael Tremer --- src/scripts/location-importer.in | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/scripts/location-importer.in b/src/scripts/location-importer.in index d455764..49e914c 100644 --- a/src/scripts/location-importer.in +++ b/src/scripts/location-importer.in @@ -1328,9 +1328,14 @@ class CLI(object): ( %s, %s, %s ) - ON CONFLICT (network) DO - UPDATE SET url = excluded.url""", - "%s" % single_network, url, source, + ON CONFLICT + ( + network + ) + DO UPDATE SET + url = excluded.url, + source = excluded.source + """, "%s" % single_network, url, source, ) def _parse_org_block(self, block, source_key): @@ -2012,6 +2017,13 @@ class CLI(object): ( %s, %s, %s ) + ON CONFLICT + ( + network + ) + DO UPDATE SET + url = excluded.url, + source = excluded.source """, (("%s" % n, url, "overrides") for n in networks), ) -- 2.47.2