#9252 closed (fixed)
IncorrectLookupParameters not being raised in admin get_query_set
Reported by: | leanmeandonothingmachine | Owned by: | Karen Tracey |
---|---|---|---|
Component: | contrib.admin | Version: | 1.0 |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Somehow in the refactoring of admin, the redirect to ERROR_FLAG functionality got lost. In the ChangeList class, the try except is in get_results but the error gets thrown from get_query_set. So if there are invalid url args, the actual field error gets thrown which is a problem on production servers.
Change History (7)
comment:1 by , 16 years ago
comment:2 by , 16 years ago
Clarification of how to recreate the problem would be helpful here. I'm thinking you are talking about things like manually tweaking a filter lookup parameter in the url. Getting it wrong used to just get you redirected to the unfiltered change list page with a special error parameter in the url that gave you a clue (if you knew what it meant) what had happened. Now I see that doesn't happen, instead you get, for example, a FieldError raised. Is this what you are talking about or something else?
comment:3 by , 16 years ago
yes that's what I'm talking about. something like /admin/myapp/mymodel/?notafield=foo. As you said it used to redirect and the code for that is still in there just in a different place.
comment:4 by , 16 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:5 by , 16 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
This actually happened when queryset-refactor got merged to trunk, not when newforms-admin came in. Apparently the error that used to be caught later is now caught sooner in the query code.
comment:6 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
That should say gets raised, not thrown.