Skip to content

Commit

Permalink
update formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
arthanson committed Jan 23, 2023
1 parent 69f1295 commit 53eaca6
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions pynetbox/core/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,15 @@ def flatten_custom(custom_dict):
ret = {}

for k, val in custom_dict.items():
current_val = val
current_val = val

if isinstance(val, dict):
current_val = val.get('id', val)
if isinstance(val, dict):
current_val = val.get("id", val)

if isinstance(val, list):
current_val = [
v.get("id") if isinstance(v, dict) else v for v in val
]
if isinstance(val, list):
current_val = [v.get("id") if isinstance(v, dict) else v for v in val]

ret[k] = current_val
ret[k] = current_val
return ret


Expand Down

0 comments on commit 53eaca6

Please sign in to comment.