Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#1554 closed defect (fixed)

[patch] shortcuts.get_list_or_404 uses old model API

Reported by: Christopher Lenz <cmlenz@…> Owned by: adrian
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:

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 Changed 9 years ago by jacob

  • Resolution set to fixed
  • Status changed from new to closed

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

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