From: Michael Tremer Date: Tue, 12 Mar 2024 11:14:13 +0000 (+0000) Subject: importer: Currently update the source when encountering a conflict X-Git-Tag: 0.9.18~84 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1042baa7bfbd758b96fec827e53bddee14e5d106;p=location%2Flibloc.git importer: Currently update the source when encountering a conflict Signed-off-by: Michael Tremer --- 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), )