NetBox 4.7 compatibility - #106
Closed
cfoellmann wants to merge 1 commit into
Closed
cfoellmann wants to merge 1 commit into
cfoellmann wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
querystringtag, the removedRelatedLinkColumn,registry['models'], or MPTT-only Location/Region methods.Fixes found during that verification:
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.Claude-Session: https://claude.ai/code/session_01RDsiDcH4D2jfv2k9VjoNcX