Get the rack information
A 500 page with the error:
<class 'KeyError'>
'1000'
After some digging, I think the issue comes from some racks where the outer_unit field was improperly migrated (going from 2.6.5 to 2.7.3).
In the database, I can see:
netbox=> select count(1), outer_unit from dcim_rack group by outer_unit;
count | outer_unit
-------+------------
9 | 1000
4413 |
(2 rows)
The issue might be related to https://github.com/netbox-community/netbox/issues/3967
I just checked, the migration is there so this will need a test migration from 2.6.x, I will check later this afternoon and let you know
Yep, I see the issue. There's a typo in rack_outer_unit_to_slug(), similar to #4027. Will be fixed in the next release. Yet another example of something that should have been caught during the v2.7 beta, unfortunately.
As an immediate workaround, you can do this:
$ ./manage.py nbshell
### NetBox interactive shell (jstretch-workstation)
### Python 3.6.9 | Django 2.2.9 | NetBox 2.7.4-dev
### lsmodels() will show available models. Use help(<model>) for more info.
>>> Rack.objects.filter(outer_unit='1000').update(outer_unit='mm')
0
>>> Rack.objects.filter(outer_unit='2000').update(outer_unit='in')
0
(The number returned by either command indicates the number of rows that were updated.)
Most helpful comment
Yep, I see the issue. There's a typo in
rack_outer_unit_to_slug(), similar to #4027. Will be fixed in the next release. Yet another example of something that should have been caught during the v2.7 beta, unfortunately.As an immediate workaround, you can do this:
(The number returned by either command indicates the number of rows that were updated.)