portadmin crashes when searching for a netbox that has no type

Bug #1419746 reported by John-Magne Bredal
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Network Administration Visualized
Fix Released
Low
John-Magne Bredal

Bug Description

Traceback (most recent call last):

  File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 109, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "/usr/lib/python2.7/dist-packages/nav/web/portadmin/views.py", line 79, in index
    return search_by_sysname(request, netboxes[0].sysname)

  File "/usr/lib/python2.7/dist-packages/nav/web/portadmin/views.py", line 145, in search_by_sysname
    info_dict = populate_infodict(request, account, netbox, interfaces)

  File "/usr/lib/python2.7/dist-packages/nav/web/portadmin/views.py", line 182, in populate_infodict
    fac = get_and_populate_livedata(netbox, interfaces)

  File "/usr/lib/python2.7/dist-packages/nav/web/portadmin/utils.py", line 38, in get_and_populate_livedata
    handler = SNMPFactory.get_instance(netbox)

  File "/usr/lib/python2.7/dist-packages/nav/portadmin/snmputils.py", line 620, in get_instance
    vendor_id = netbox.type.get_enterprise_id()

AttributeError: 'NoneType' object has no attribute 'get_enterprise_id'

Revision history for this message
John-Magne Bredal (john-m-bredal) wrote :
Changed in nav:
assignee: nobody → John-Magne Bredal (john-m-bredal)
milestone: none → 4.2.3
importance: Undecided → Low
status: New → Fix Committed
Changed in nav:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.