Commit 7d12c96f authored by Stauros Kroustouris's avatar Stauros Kroustouris

unique results in api

parent acce62b4
...@@ -26,9 +26,8 @@ def peer_ifces(request, peer_id): ...@@ -26,9 +26,8 @@ def peer_ifces(request, peer_id):
'ifce':, 'ifce':,
'site': ifce.description.split('[')[1].split('-')[0] 'site': ifce.description.split('[')[1].split('-')[0]
}) })
response = list(set(response))
json_str = json.dumps(response) json_str = json.dumps(list({v['ifce']:v for v in response}.values()))
return HttpResponse( return HttpResponse(
json_str, json_str,
mimetype='application/json', mimetype='application/json',
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