Commit 671e149e authored by Michael Tremer's avatar Michael Tremer

importer: Move importing extended sources/ARIN into transaction

All imports should have been conducted in one large transaction so that
we can remove any previous data.

This was not the case because of an indentation issue and could have
caused that the transaction was commited without all data being
successfully re-imported.

Fixes: #12852
Signed-off-by: default avatarMichael Tremer <michael.tremer@ipfire.org>
parent 85e44d9a
......@@ -515,7 +515,6 @@ class CLI(object):
# Download all extended sources
for source_key in location.importer.EXTENDED_SOURCES:
for single_url in location.importer.EXTENDED_SOURCES[source_key]:
with self.db.transaction():
# Download data
for line in downloader.request_lines(single_url):
self._parse_line(line, source_key, validcountries)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment