Skip to content

Commit

Permalink
fix channel edit
Browse files Browse the repository at this point in the history
  • Loading branch information
laurapanzariello committed Feb 22, 2018
1 parent 4623815 commit f15c5dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions networkapi/interface/resource/InterfaceGetResource.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ def handle_get(self, request, user, *args, **kwargs):

if channel:
if equip_name:
get_channel = Interface.objects.get(equipamento__nome=equip_name,channel__nome=channel)
channel_id = get_channel.channel.id if get_channel else ""
get_channel = Interface.objects.filter(channel__id=channel)
channel_id = get_channel[0].channel.id if get_channel else ""
interfaces = Interface.objects.filter(channel__id=channel_id) if channel_id else []
for i in interfaces:
equipInterface_list.append(get_new_interface_map(i))
Expand Down

0 comments on commit f15c5dd

Please sign in to comment.