1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Initial work on API v2.0

This commit is contained in:
Jeremy Stretch
2017-01-24 17:12:16 -05:00
parent fbfa3cf619
commit 062a5bfe8d
14 changed files with 216 additions and 386 deletions

View File

@ -27,6 +27,8 @@ class BINDZoneRenderer(renderers.BaseRenderer):
def render(self, data, media_type=None, renderer_context=None):
records = []
if not isinstance(data, (list, tuple)):
data = (data,)
for record in data:
if record.get('name') and record.get('primary_ip'):
try: