We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents dfb58e6 + a3d4659 commit af06260Copy full SHA for af06260
networkapi/api_asn/models.py
@@ -68,10 +68,11 @@ def create_v4(self, as_map):
68
self.description = as_map.get('description')
69
self.save()
70
71
- if as_map.get("equip_id"):
+ if len(as_map.get("equip_id")):
72
asn_equip = AsnEquipment()
73
- asn_equip.create_v4(dict(equipment=as_map.get("equip_id"),
74
- asn=self.id))
+ for equip in as_map.get("equip_id"):
+ asn_equip.create_v4(dict(equipment=equip,
75
+ asn=self.id))
76
77
def update_v4(self, as_map):
78
"""Update ASN."""
networkapi/api_asn/v4/specs/as_post.json
@@ -18,7 +18,7 @@
18
"type": "string"
19
},
20
"equip_id": {
21
- "type": "integer"
+ "type": "array"
22
}
23
24
"required": [
0 commit comments