Skip to content

Fix typed tab crash on NetBox 4.5.4-Docker + single-source version#2

Merged
Kani999 merged 3 commits intomasterfrom
fix/table-user-kwarg-and-single-version
Mar 6, 2026
Merged

Fix typed tab crash on NetBox 4.5.4-Docker + single-source version#2
Kani999 merged 3 commits intomasterfrom
fix/table-user-kwarg-and-single-version

Conversation

@Kani999
Copy link
Collaborator

@Kani999 Kani999 commented Mar 6, 2026

Summary

Fixes a TypeError crash on the typed tab when using netbox_custom_objects 0.4.6 on NetBox 4.5.4-Docker.

Changes

Fixed

  • Table.__init__() got an unexpected keyword argument 'user' — removed user=request.user from the CustomObjectTable instantiation in views/typed.py. django_tables2.Table.__init__ does not accept this kwarg. It was redundant — table.configure(request) called immediately after already applies all per-user column preferences and ordering.

Changed

  • Single-source version — plugin version is now defined only in pyproject.toml and read at runtime via importlib.metadata.version(). The duplicate hardcoded string in __init__.py is gone.

Testing

  • All 50 unit tests pass (pytest tests/ -v)
  • ruff check and ruff format clean

Kani999 added 3 commits March 6, 2026 12:19
- Remove user=request.user from typed tab table instantiation;
  django_tables2.Table does not accept this kwarg and NetBox 4.5.4
  passes it through, causing TypeError. Per-user preferences are
  already applied by table.configure(request) called immediately after.
- Read plugin version from package metadata (importlib.metadata) so
  it is defined only in pyproject.toml, not duplicated in __init__.py.
@Kani999 Kani999 merged commit 421df7a into master Mar 6, 2026
2 checks passed
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