Skip to content

NetBox 4.7 compatibility - #106

Closed
cfoellmann wants to merge 1 commit into
netbox-community:mainfrom
cfoellmann:claude/sharp-mendel-pxtsk1
Closed

cfoellmann wants to merge 1 commit into
netbox-community:mainfrom
cfoellmann:claude/sharp-mendel-pxtsk1

Conversation

@cfoellmann

Copy link
Copy Markdown

Bump the supported NetBox range to 4.7.x (release 0.9.3) and fix issues found while verifying the plugin against a live NetBox 4.7.0 install.

Verified against NetBox 4.7.0 (Django 6.1, django-tables2 3.0.1, PostgreSQL 16 with ltree, Python 3.12): migrations apply with no pending model changes, every plugin view/tab/HTMX table and REST endpoint returns 200, the canvas/dimension/background PATCH save paths work, and the OpenAPI schema and collectstatic run clean. No code changes were needed for the 4.7 breaking changes themselves -- the plugin does not use the renamed django-tables2 querystring tag, the removed RelatedLinkColumn, registry['models'], or MPTT-only Location/Region methods.

Fixes found during that verification:

  • FloorplanFilterSet.search() filtered on description, which Floorplan does not have, so any ?q= query against the REST API raised FieldError (HTTP 500). Search now matches site, location and assigned image names, and short-circuits on blank input.
  • Add FloorplanImageFilterSet and wire it to FloorplanImageViewSet, which previously had no filterset at all.
  • Annotate FloorplanImage.filename as returning str, silencing four drf-spectacular type-hint warnings emitted during schema generation.

Claude-Session: https://claude.ai/code/session_01RDsiDcH4D2jfv2k9VjoNcX

Bump the supported NetBox range to 4.7.x (release 0.9.3) and fix issues
found while verifying the plugin against a live NetBox 4.7.0 install.

Verified against NetBox 4.7.0 (Django 6.1, django-tables2 3.0.1,
PostgreSQL 16 with ltree, Python 3.12): migrations apply with no pending
model changes, every plugin view/tab/HTMX table and REST endpoint returns
200, the canvas/dimension/background PATCH save paths work, and the
OpenAPI schema and collectstatic run clean. No code changes were needed
for the 4.7 breaking changes themselves -- the plugin does not use the
renamed django-tables2 `querystring` tag, the removed `RelatedLinkColumn`,
`registry['models']`, or MPTT-only Location/Region methods.

Fixes found during that verification:

- FloorplanFilterSet.search() filtered on `description`, which Floorplan
  does not have, so any `?q=` query against the REST API raised
  FieldError (HTTP 500). Search now matches site, location and assigned
  image names, and short-circuits on blank input.
- Add FloorplanImageFilterSet and wire it to FloorplanImageViewSet, which
  previously had no filterset at all.
- Annotate FloorplanImage.filename as returning str, silencing four
  drf-spectacular type-hint warnings emitted during schema generation.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RDsiDcH4D2jfv2k9VjoNcX
cruse1977 added a commit that referenced this pull request Sep 18, 2026
min_version had been left commented out in FloorplanConfig after local
testing against a pre-release NetBox feature build, so the plugin never
rejected an incompatible (pre-4.7) install. Restore it to match
max_version and the compatibility matrix.

Cross-checked #106 against this branch: the
FloorplanFilterSet.search() FieldError was already fixed here, but
FloorplanImageViewSet had no filterset at all, so FloorplanImageFilterSet
is added and wired in (matching name/external_url/comments), Floorplan
search now also matches the assigned image's name, and
FloorplanImage.filename is annotated to silence drf-spectacular
type-hint warnings.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@cruse1977 cruse1977 closed this Sep 18, 2026
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.

3 participants