Netbox 2.7.1 - Region filter bug on Components pages

41 views
Skip to first unread message

Darcy Lange

unread,
Jan 20, 2020, 3:53:21 PM1/20/20
to NetBox
Hi All, 

Getting a type error when filtering by region on the components pages in 2.7.1. Region filter is working elsewhere still. See below.

Is any one else seeing this? Happy to raise a bug for this if required...

Cheers,
Darcy

TypeError at /dcim/interfaces/

'Region' object is not iterable
Request Method:GET
Request URL:http://netbox-non-prod.vpc-4865862f.airnz.co.nz/dcim/interfaces/?q=&region=99&site=
Django Version:2.2.9
Exception Type:TypeError
Exception Value:
'Region' object is not iterable

Brian Candler

unread,
Jan 20, 2020, 4:54:34 PM1/20/20
to NetBox
Yep, I see that too.  Nice easy-to-reproduce bug.

Darcy Lange

unread,
Jan 20, 2020, 10:09:50 PM1/20/20
to Brian Candler, NetBox
Thanks Brian,

Think I've spotted another with interface type (formerly form_factor) displaying as its id 32767 which creates a key error when referring to it via API.

Will raise a bug for both.

KeyError at /api/dcim/interfaces/9016/

'32767'
Request Method:GET
Request URL:http:///api/dcim/interfaces/9016/
Django Version:2.2.9
Exception Type:KeyError
Exception Value:
'32767'
Exception Location:/opt/netbox/netbox/utilities/api.py in to_representation, line 86
Python Executable:/usr/local/bin/python
Python Version:3.7.6
Python Path:
['/opt/netbox/netbox',
 '/usr/local/bin',
 '/usr/local/lib/python37.zip',
 '/usr/local/lib/python3.7',
 '/usr/local/lib/python3.7/lib-dynload',
 '/usr/local/lib/python3.7/site-packages']
Server time:Tue, 21 Jan 2020 16:06:34 +1300



On Tue, Jan 21, 2020 at 10:54 AM Brian Candler <b.ca...@pobox.com> wrote:
Yep, I see that too.  Nice easy-to-reproduce bug.

--
You received this message because you are subscribed to the Google Groups "NetBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netbox-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netbox-discuss/91aa6e3c-8cd0-4b4f-8ab4-c3c5564f1064%40googlegroups.com.

Brian Candler

unread,
Jan 21, 2020, 3:44:28 AM1/21/20
to NetBox
On Tuesday, 21 January 2020 03:09:50 UTC, Darcy Lange wrote:
Think I've spotted another with interface type (formerly form_factor) displaying as its id 32767 which creates a key error when referring to it via API.


That is weird, as the database migration when upgrading to 2.7 changed all these integer "form factors" into strings.

At a glance, the problem could be in netbox/dcim/choices.py:  InterfaceTypeChoices.LEGACY_MAP is missing TYPE_OTHER

Reply all
Reply to author
Forward
0 new messages