Opened 8 years ago

Closed 8 years ago

#7259 closed (wontfix)

Better control flow for change made in 7536

Reported by: leotr Owned by: leotr
Component: contrib.admin Version: master
Severity: Keywords:
Cc: Triage Stage: Design decision needed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


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)

1.diff (1.3 KB) - added by leotr 8 years ago.

Download all attachments as: .zip

Change History (4)

Changed 8 years ago by leotr

comment:1 Changed 8 years ago by leotr

  • Component changed from Uncategorized to Admin interface
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Design decision needed

comment:2 Changed 8 years ago by Valera Grishin


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.

comment:3 Changed 8 years ago by russellm

  • Resolution set to wontfix
  • Status changed from new to 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.
Back to Top