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.
1 parent 69f1295 commit 53eaca6Copy full SHA for 53eaca6
pynetbox/core/response.py
@@ -61,17 +61,15 @@ def flatten_custom(custom_dict):
61
ret = {}
62
63
for k, val in custom_dict.items():
64
- current_val = val
+ current_val = val
65
66
- if isinstance(val, dict):
67
- current_val = val.get('id', val)
+ if isinstance(val, dict):
+ current_val = val.get("id", val)
68
69
- if isinstance(val, list):
70
- current_val = [
71
- v.get("id") if isinstance(v, dict) else v for v in val
72
- ]
+ if isinstance(val, list):
+ current_val = [v.get("id") if isinstance(v, dict) else v for v in val]
73
74
- ret[k] = current_val
+ ret[k] = current_val
75
return ret
76
77
0 commit comments