Skip to content

Commit 421df7a

Browse files
authored
Merge pull request #2 from CESNET/fix/table-user-kwarg-and-single-version
Fix typed tab crash on NetBox 4.5.4-Docker + single-source version
2 parents fd7835e + 4ce4da1 commit 421df7a

File tree

5 files changed

+21
-5
lines changed

5 files changed

+21
-5
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ db.sqlite3
2929
*.swo
3030

3131
tools/
32-
33-
ignore/
32+
ignore/
33+
.claude/

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [2.0.2] - 2026-03-06
9+
10+
### Fixed
11+
12+
- **TypeError on typed tab** — removed `user=` keyword argument from `CustomObjectTable`
13+
instantiation. `django_tables2.Table.__init__` does not accept this kwarg; it was
14+
redundant because `table.configure(request)` already applies per-user column preferences.
15+
Fixes crash on NetBox 4.5.4-Docker (`netbox_custom_objects` 0.4.6).
16+
17+
### Changed
18+
19+
- Plugin version is now defined only in `pyproject.toml` and read at runtime via
20+
`importlib.metadata.version()`, eliminating the duplicate version string in `__init__.py`.
21+
822
## [2.0.1] - 2026-02-25
923

1024
### Added

netbox_custom_objects_tab/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1+
from importlib.metadata import version
2+
13
from netbox.plugins import PluginConfig
24

35

46
class NetBoxCustomObjectsTabConfig(PluginConfig):
57
name = "netbox_custom_objects_tab"
68
verbose_name = "Custom Objects Tab"
79
description = 'Adds a "Custom Objects" tab to NetBox object detail pages'
8-
version = "2.0.1"
10+
version = version("netbox-custom-objects-tab")
911
author = "Jan Krupa"
1012
author_email = "jan.krupa@cesnet.cz"
1113
base_url = "custom-objects-tab"

netbox_custom_objects_tab/views/typed.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ def get(self, request, pk):
203203

204204
# Build table class and instantiate
205205
table_class = _build_typed_table_class(cot, dynamic_model)
206-
table = table_class(filtered_qs, user=request.user)
206+
table = table_class(filtered_qs)
207207
table.columns.show("pk")
208208

209209
# Shadow @cached_property to avoid reverse error for dynamic models

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "netbox-custom-objects-tab"
7-
version = "2.0.1"
7+
version = "2.0.2"
88
description = "NetBox plugin that adds a Custom Objects tab to object detail pages"
99
readme = "README.md"
1010
requires-python = ">=3.12"

0 commit comments

Comments
 (0)