Opened 16 years ago
Closed 16 years ago
#7259 closed (wontfix)
Better control flow for change made in 7536
Reported by: | leotr | Owned by: | leotr |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Design decision needed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
It's better to make all by standard methods than dealing with list(queryset)[0] and len(list(queryset)).
All we want to do is to get ONE user or report error if user count is not 1. So the get() method
and exceptions is the best i think.
Attachments (1)
Change History (4)
by , 16 years ago
comment:1 by , 16 years ago
Component: | Uncategorized → Admin interface |
---|---|
Triage Stage: | Unreviewed → Design decision needed |
comment:2 by , 16 years ago
comment:3 by , 16 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Closing this ticket in favour of #7263, which is a better approach to solving this problem.
Note:
See TracTickets
for help on using tickets.
Hi
I've opened #7263 that proposes to close potential security risks posed by the same piece of code. It completely removes the lines under discussion.
Good point on standard methods thought, leotr.