Skip to content

Fix TypeError on NetBox 4.6 list views (Django 6.0 format_html change)#17

Merged
diegogodoy06 merged 1 commit into
mainfrom
fix/netbox-4.6-django6-format-html
May 14, 2026
Merged

Fix TypeError on NetBox 4.6 list views (Django 6.0 format_html change)#17
diegogodoy06 merged 1 commit into
mainfrom
fix/netbox-4.6-django6-format-html

Conversation

@diegogodoy06

Copy link
Copy Markdown
Owner

Django 6.0 (shipped with NetBox 4.6) raises TypeError when format_html() is called without placeholders or args; previous versions only emitted a DeprecationWarning. This broke the maintenance-plans and upcoming list views with TypeError: args or kwargs must be provided.

Replaced 10 static format_html('<span ...>literal</span>') calls in tables.py with mark_safe(...). The one remaining format_html('... {} ...', abs(days)) call uses a placeholder and positional arg, so it stays valid under Django 6.0. Bumped plugin to v1.3.1 and updated docs.

Django 6.0 (shipped with NetBox 4.6) raises TypeError when format_html()
is called without placeholders or args; previous versions only emitted a
DeprecationWarning. This broke the maintenance-plans and upcoming list
views with `TypeError: args or kwargs must be provided.`

Replaced 10 static `format_html('<span ...>literal</span>')` calls in
tables.py with `mark_safe(...)`. The one remaining `format_html('... {} ...',
abs(days))` call uses a placeholder and positional arg, so it stays valid
under Django 6.0. Bumped plugin to v1.3.1 and updated docs.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@diegogodoy06 diegogodoy06 self-assigned this May 14, 2026
@diegogodoy06 diegogodoy06 added bug Something isn't working enhancement New feature or request labels May 14, 2026
@diegogodoy06 diegogodoy06 linked an issue May 14, 2026 that may be closed by this pull request
@diegogodoy06 diegogodoy06 merged commit aa4c696 into main May 14, 2026
1 check passed
@diegogodoy06 diegogodoy06 deleted the fix/netbox-4.6-django6-format-html branch May 14, 2026 03:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compatibility with 4.6

1 participant