Better control flow for change made in 7536
|Reported by:||leotr||Owned by:||leotr|
|Cc:||Triage Stage:||Design decision needed|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
It's better to make all by standard methods than dealing with list(queryset) 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.
Change History (4)
Changed 7 years ago by leotr
comment:1 Changed 7 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