Opened 18 years ago

Closed 18 years ago

Last modified 18 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: 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

Change History (1)

comment:1 by Jacob, 18 years ago

Resolution: fixed
Status: newclosed

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

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