Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#1554 closed defect (fixed)

[patch] shortcuts.get_list_or_404 uses old model API

Reported by: Christopher Lenz <cmlenz@…> 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: UI/UX:


The (trivial) fix is:

Index: django/shortcuts/
--- django/shortcuts/        (revision 226)
+++ django/shortcuts/        (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

Change History (1)

comment:1 Changed 12 years ago by Jacob

Resolution: fixed
Status: newclosed

(In [2594]) magic-removal: fixed #1554 (thanks, Christopher Lenz)

Note: See TracTickets for help on using tickets.
Back to Top