Commit 2e66630b authored by Kostas Papadimitriou's avatar Kostas Papadimitriou

helpdesk: Exclude nics of deleted vms

when helpdesk users search using ip address
parent a2daae31
......@@ -185,7 +185,7 @@ def account(request, search_query):
if is_ip:
try:
nic = NetworkInterface.objects.get(ipv4=search_query)
nic = NetworkInterface.objects.get(ipv4=search_query).exclude(machine__deleted=True)
search_query = nic.machine.userid
is_uuid = True
except NetworkInterface.DoesNotExist:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment