Update netbox/dcim/api/views.py

Test without decode_dict function

Co-authored-by: Jeremy Stretch <jstretch@ns1.com>
This commit is contained in:
rizlas 2021-12-21 17:15:54 +01:00 committed by GitHub
parent 2ec64a2ea2
commit 39a0b15df4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -501,7 +501,7 @@ class DeviceViewSet(ConfigContextQuerySetMixin, CustomFieldModelViewSet):
response[method] = {'error': 'Only get_* NAPALM methods are supported'} response[method] = {'error': 'Only get_* NAPALM methods are supported'}
continue continue
try: try:
response[method] = decode_dict(getattr(d, method)(), decode_keys=False) response[method] = getattr(d, method)()
except NotImplementedError: except NotImplementedError:
response[method] = {'error': 'Method {} not implemented for NAPALM driver {}'.format(method, driver)} response[method] = {'error': 'Method {} not implemented for NAPALM driver {}'.format(method, driver)}
except Exception as e: except Exception as e: