Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix host info for host with multiple IPs on same MAC #338

Merged
merged 9 commits into from
Nov 21, 2024
2 changes: 1 addition & 1 deletion mreg_cli/utilities/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ def get_list_generic(
if expect_one_result:
if len(ret) == 0:
return {}
if len(ret) != 1:
if len(ret) > 1 and not all(ret[0] == x for x in ret):
pederhan marked this conversation as resolved.
Show resolved Hide resolved
raise MultipleEntititesFound(f"Expected exactly one result, got {len(ret)}.")
terjekv marked this conversation as resolved.
Show resolved Hide resolved
return ret[0]
return ret
Expand Down