Django

Code

Ticket #1554 (closed: fixed)

Opened 3 years ago

Last modified 2 years ago

[patch] shortcuts.get_list_or_404 uses old model API

Reported by: Christopher Lenz <cmlenz@gmx.de> Assigned to: adrian
Milestone: Component: Core framework
Version: magic-removal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

Attachments

Change History

03/29/06 10:05:57 changed by jacob

  • status changed from new to closed.
  • resolution set to fixed.

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


Add/Change #1554 ([patch] shortcuts.get_list_or_404 uses old model API)




Change Properties
Action