Browse Source

import script fixes for current db

Sebastian Lohff 4 years ago
parent
commit
48499d9436
1 changed files with 6 additions and 4 deletions
  1. 6
    4
      bin/import-data

+ 6
- 4
bin/import-data View File

@@ -38,9 +38,8 @@ def main():
38 38
 	parser = _parser()
39 39
 	args = parser.parse_args()
40 40
 
41
-	defContact = Contact.objects.get(handle="DURC1-DN")
42
-	defContact
43
-	defMnt = Maintainer.objects.get(handle="DARK1-MNT")
41
+	defContact = Contact.objects.get(handle="UNKNOWN-DN")
42
+	defMnt = Maintainer.objects.get(handle="DARKNET-MNT")
44 43
 	blocks = [
45 44
 		ASBlock.objects.get(handle="TRA1-ASB"),
46 45
 		ASBlock.objects.get(handle="UAB1-ASB")
@@ -49,7 +48,8 @@ def main():
49 48
 		InetNum.objects.get(handle="TRA1-NET"),
50 49
 		InetNum.objects.get(handle="DEF4-NET"),
51 50
 		InetNum.objects.get(handle="DEF6-NET"),
52
-		InetNum.objects.get(handle="UNR1-NET"),
51
+		InetNum.objects.get(handle="MISC6-NET"),
52
+		InetNum.objects.get(handle="LTRA1-NET"),
53 53
 		InetNum.objects.get(handle="MAIN4-NET"),
54 54
 	]
55 55
 
@@ -82,6 +82,7 @@ def main():
82 82
 		obj.description = "Object has been imported from old DB and has not yet been edited"
83 83
 		obj.save()
84 84
 		obj.mnt_by.add(defMnt)
85
+		obj.admin_c.add(defContact)
85 86
 		obj.save()
86 87
 
87 88
 	for net in data["network"]:
@@ -117,6 +118,7 @@ def main():
117 118
 		obj.save()
118 119
 
119 120
 		obj.mnt_by.add(defMnt)
121
+		obj.admin_c.add(defContact)
120 122
 		if origin:
121 123
 			obj.origin_as.add(origin)
122 124
 		obj.save()

Loading…
Cancel
Save