#12120 closed (invalid)
documentation: get() does not work with values()
Reported by: | adrian_nye | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | 1.1 |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Under get() and values() in the queryset documentation, it does not mention that these two do not work together. It would be good to mention
this under values() along with the workaround using filter() instead of get().
Change History (2)
comment:1 by , 15 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 by , 15 years ago
And about your workaround, you wouldn't use filter but this:
.values().get()
Note:
See TracTickets
for help on using tickets.
The docs state quite clearly that get() doesn't return a QuerySet, since values() is a method on queryset it's self-evident that get().values() wouldn't work.