Skip to content

Fix crash in navlet htmx error responses#3802

Merged
Simrayz merged 1 commit into5.17.xfrom
bugfix/navlet-error-response-missing-id
Feb 26, 2026
Merged

Fix crash in navlet htmx error responses#3802
Simrayz merged 1 commit into5.17.xfrom
bugfix/navlet-error-response-missing-id

Conversation

@Simrayz
Copy link
Copy Markdown
Contributor

@Simrayz Simrayz commented Feb 25, 2026

Scope and purpose

Fix navlet error responses crashing with NoReverseMatch because navlet_id was never set on the Navlet instance created in _handle_htmx_error_response.

Contributor Checklist

  • Added a changelog fragment for towncrier
  • Added/amended tests for new/changed code
  • Added/changed documentation
  • Linted/formatted the code with ruff, easiest by using pre-commit
  • Wrote the commit message so that the first line continues the sentence "If applied, this commit will ...", starts with a capital letter, does not end with punctuation and is 50 characters or less long. See https://cbea.ms/git-commit/
  • Based this pull request on the correct upstream branch: For a patch/bugfix affecting the latest stable version, it should be based on that version's branch (<major>.<minor>.x). For a new feature or other additions, it should be based on master.

@Simrayz Simrayz self-assigned this Feb 25, 2026
@Simrayz Simrayz requested a review from a team February 25, 2026 11:38
@Simrayz Simrayz marked this pull request as ready for review February 25, 2026 11:44
Add regression test for navlet error response with sudoer
@Simrayz Simrayz force-pushed the bugfix/navlet-error-response-missing-id branch from 7fc3658 to 6fe728e Compare February 25, 2026 11:55
@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown

Test results

    20 files      20 suites   25m 16s ⏱️
 2 870 tests  2 870 ✅ 0 💤 0 ❌
16 392 runs  16 392 ✅ 0 💤 0 ❌

Results for commit 6fe728e.

Copy link
Copy Markdown
Contributor

@johannaengland johannaengland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a description on how to recreate this bug?

@Simrayz Simrayz merged commit f4e162f into 5.17.x Feb 26, 2026
17 checks passed
@Simrayz Simrayz deleted the bugfix/navlet-error-response-missing-id branch February 26, 2026 09:52
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.37%. Comparing base (31b94d8) to head (6fe728e).
⚠️ Report is 2 commits behind head on 5.17.x.

Additional details and impacted files
@@           Coverage Diff           @@
##           5.17.x    #3802   +/-   ##
=======================================
  Coverage   63.37%   63.37%           
=======================================
  Files         619      619           
  Lines       45871    45874    +3     
  Branches       43       43           
=======================================
+ Hits        29071    29074    +3     
  Misses      16790    16790           
  Partials       10       10           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants