-
Notifications
You must be signed in to change notification settings - Fork 155
fix:NoReverseMatch error in question delete template #1440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR fixes a NoReverseMatch error on the question delete page by updating the template to use the correct event product URL name and parameter when rendering links to dependent products. Sequence diagram for rendering question delete page with corrected product linkssequenceDiagram
actor Admin
participant Browser
participant QuestionDeleteView
participant DjangoTemplateEngine
participant URLResolver
Admin->>Browser: Request question delete page
Browser->>QuestionDeleteView: HTTP GET /control/.../questions/<id>/delete
QuestionDeleteView->>DjangoTemplateEngine: Render template question_delete.html with context
loop For each item in dependent
DjangoTemplateEngine->>URLResolver: reverse control:event.product(organizer, event, product=item.pk)
URLResolver-->>DjangoTemplateEngine: Resolved product URL
end
DjangoTemplateEngine-->>QuestionDeleteView: HTML with product links
QuestionDeleteView-->>Browser: HTTP 200 response
Browser-->>Admin: Display delete confirmation with working product links
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes a NoReverseMatch error in the question delete template by correcting the URL pattern reference for product links.
Key Changes:
- Updated URL name from
control:event.itemtocontrol:event.product - Changed URL parameter from
item=item.pktoproduct=item.pkto match the correct URL pattern definition
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Fixes #1441
How I fixed it
Updated the template to use the correct URL pattern name that actually exists in the codebase:
"control:event.item"to"control:event.product"item=item.pktoproduct=item.pkto match what the URL expectsTesting done
I've tested this locally and confirmed:
Before:

After:

Summary by Sourcery
Bug Fixes:
Summary by Sourcery
Bug Fixes: