Kaydet (Commit) 79633b28 authored tarafından Adrian Holovaty's avatar Adrian Holovaty

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
üst f8915c06
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment