]> git.ipfire.org Git - location/libloc.git/commitdiff
importer: Don't write AS without names into the database
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 14 Jul 2023 10:26:24 +0000 (10:26 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 14 Jul 2023 10:27:22 +0000 (10:27 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/scripts/location-importer.in

index c578de06f12b9ff638c7741a92d390ae5b028c4b..3607e19b3345c9b521ed41a0e7d8d84778af6b1f 100644 (file)
@@ -285,6 +285,10 @@ class CLI(object):
                        """)
 
                for row in rows:
+                       # Skip AS without names
+                       if not row.name:
+                               continue
+
                        a = writer.add_as(row.number)
                        a.name = row.name