From 48499d94368b9132adbd2b53682eb13ff75bb6b6 Mon Sep 17 00:00:00 2001 From: Sebastian Lohff Date: Sat, 15 Apr 2017 16:49:27 +0200 Subject: [PATCH] import script fixes for current db --- bin/import-data | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bin/import-data b/bin/import-data index 5146b31..2eeedce 100755 --- a/bin/import-data +++ b/bin/import-data @@ -38,9 +38,8 @@ def main(): parser = _parser() args = parser.parse_args() - defContact = Contact.objects.get(handle="DURC1-DN") - defContact - defMnt = Maintainer.objects.get(handle="DARK1-MNT") + defContact = Contact.objects.get(handle="UNKNOWN-DN") + defMnt = Maintainer.objects.get(handle="DARKNET-MNT") blocks = [ ASBlock.objects.get(handle="TRA1-ASB"), ASBlock.objects.get(handle="UAB1-ASB") @@ -49,7 +48,8 @@ def main(): InetNum.objects.get(handle="TRA1-NET"), InetNum.objects.get(handle="DEF4-NET"), InetNum.objects.get(handle="DEF6-NET"), - InetNum.objects.get(handle="UNR1-NET"), + InetNum.objects.get(handle="MISC6-NET"), + InetNum.objects.get(handle="LTRA1-NET"), InetNum.objects.get(handle="MAIN4-NET"), ] @@ -82,6 +82,7 @@ def main(): obj.description = "Object has been imported from old DB and has not yet been edited" obj.save() obj.mnt_by.add(defMnt) + obj.admin_c.add(defContact) obj.save() for net in data["network"]: @@ -117,6 +118,7 @@ def main(): obj.save() obj.mnt_by.add(defMnt) + obj.admin_c.add(defContact) if origin: obj.origin_as.add(origin) obj.save()