-
Notifications
You must be signed in to change notification settings - Fork 160
fix: NoReverseMatch error in quota delete template #1416
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
base: enext
Are you sure you want to change the base?
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates the quota delete confirmation template to use the correct URL pattern and parameter name for linked products, resolving a NoReverseMatch and ensuring proper navigation from the list of dependent products. Sequence diagram for resolving linked product URL in quota delete templatesequenceDiagram
actor Admin
participant Browser
participant QuotaDeleteTemplate
participant DjangoURLResolver as URLResolver
participant ProductDetailView
Admin->>Browser: Click linked product name in quota delete page
Browser->>QuotaDeleteTemplate: Request quota_delete.html
QuotaDeleteTemplate->>QuotaDeleteTemplate: Render anchor with url control:event.product and param product=item.pk
QuotaDeleteTemplate-->>Browser: HTML response with correct product link
Admin->>Browser: Click product link
Browser->>DjangoURLResolver: HTTP GET /control/event/product/{product_pk}
DjangoURLResolver->>DjangoURLResolver: Resolve control:event.product with product parameter
DjangoURLResolver->>ProductDetailView: Dispatch resolved request
ProductDetailView-->>Browser: Render product detail page
Browser-->>Admin: Display product detail view
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 quota delete template by correcting the URL pattern name and parameter to match the actual URL configuration defined in the codebase.
- Updated the URL pattern from the non-existent
control:event.itemto the correctcontrol:event.product - Changed the parameter from
item=toproduct=to match the URL pattern's expected parameter name
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sak1012
left a comment
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.
Please update the PR with a rebase
06a344f to
245825e
Compare
|
@Sak1012 Rebased as requested |
Fixes #1404
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:
Summary by Sourcery
Bug Fixes: