#1554 closed defect (fixed)
[patch] shortcuts.get_list_or_404 uses old model API
| Reported by: | Owned by: | Adrian Holovaty | |
|---|---|---|---|
| Component: | Core (Other) | Version: | magic-removal |
| Severity: | normal | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
The (trivial) fix is:
Index: django/shortcuts/__init__.py
===================================================================
--- django/shortcuts/__init__.py (revision 226)
+++ django/shortcuts/__init__.py (working copy)
@@ -17,7 +17,7 @@
raise Http404
def get_list_or_404(klass, **kwargs):
- obj_list = klass._default_manager.get_list(**kwargs)
+ obj_list = klass._default_manager.filter(**kwargs)
if not obj_list:
raise Http404
return obj_list
Note:
See TracTickets
for help on using tickets.
(In [2594]) magic-removal: fixed #1554 (thanks, Christopher Lenz)