Skip to content

Commit

Permalink
flatten_custom: return dict if id is not present (#598)
Browse files Browse the repository at this point in the history
  • Loading branch information
costasd authored Aug 8, 2024
1 parent 1fc3581 commit bc6d5ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pynetbox/core/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def flatten_custom(custom_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]
current_val = [v.get("id", v) if isinstance(v, dict) else v for v in val]

ret[k] = current_val
return ret
Expand Down

0 comments on commit bc6d5ff

Please sign in to comment.