summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2006-02-25 17:14:49 +0000
committerAdrian Holovaty <adrian@holovaty.com>2006-02-25 17:14:49 +0000
commit79633b280c7ba614b1b54a234e46d7cc35b36c42 (patch)
treed251d84c6f83c80a6d9f0903b01e2d7016b07a08
parentf8915c0676a97c9e4830bee433551c5f74ff0136 (diff)
Changed get_object() not to use 'ordering' parameter from the model. Thanks, Ned Batchelder
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2390 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/core/meta/__init__.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/django/core/meta/__init__.py b/django/core/meta/__init__.py
index 800975ef2a..a4fb8af405 100644
--- a/django/core/meta/__init__.py
+++ b/django/core/meta/__init__.py
@@ -1352,6 +1352,7 @@ def _get_where_clause(lookup_type, table_prefix, field_name, value):
raise TypeError, "Got invalid lookup_type: %s" % repr(lookup_type)
def function_get_object(opts, klass, does_not_exist_exception, **kwargs):
+ kwargs['order_by'] = ()
obj_list = function_get_list(opts, klass, **kwargs)
if len(obj_list) < 1:
raise does_not_exist_exception, "%s does not exist for %s" % (opts.object_name, kwargs)