Skip to content

Fix table initialization for NetBox 4.5 compatibility#288

Open
oomchiller wants to merge 1 commit intoArnesSI:masterfrom
oomchiller:fix/netbox-4.5-table-user
Open

Fix table initialization for NetBox 4.5 compatibility#288
oomchiller wants to merge 1 commit intoArnesSI:masterfrom
oomchiller:fix/netbox-4.5-table-user

Conversation

@oomchiller
Copy link

Fix table initialization for NetBox 4.5 compatibility

Remove deprecated user argument from table constructors and rely on
table.configure(request) instead.

NetBox 4.5 no longer supports passing user to table constructors.
This caused the following error when opening the Inventory Item Group detail view:

TypeError: Table.init() got an unexpected keyword argument 'user'

Affected views:

  • inventoryitem_group
  • auditflow
  • audittrail

Tested on:

  • NetBox 4.5.4
  • Python 3.12
  • netbox_inventory 2.5.0

Stack trace:

<class 'TypeError'>
Table.__init__() got an unexpected keyword argument 'user'

Python version: 3.12.3
NetBox version: 4.5.4-Docker-4.0.2
Plugins:
  netbox_attachments: 11.0.1
  netbox_inventory: 2.5.0
  slurpit_netbox: 1.3.3

URL where the issue occurs:
https://netbox.tld/plugins/inventory/inventory-item-groups/1/

The fix updates affected views to use the current NetBox table API.

Remove deprecated `user` argument from table constructors and rely on `table.configure(request)` instead. Fixes TypeError raised on Inventory Item Group detail view and related pages under NetBox 4.5.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant