﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
28681	QuerySet.get() implies LIMIT 2	Дилян Палаузов	nobody	"If the database finds at least two results upon QuerySet.get() it can stop working, and Django will raise anyway MultipleObjectsReturned .

{{{
diff --git a/django/db/models/query.py b/django/db/models/query.py
--- a/django/db/models/query.py
+++ b/django/db/models/query.py
@@ -370,9 +370,10 @@ class QuerySet(object):
         clone = self.filter(*args, **kwargs)
         if self.query.can_filter() and not self.query.distinct_fields:
             clone = clone.order_by()
+        clone = clone[:2]
         num = len(clone)
         if num == 1:
-            return clone._result_cache[0]
+            return clone[0]
         if not num:
             raise self.model.DoesNotExist(
                 ""%s matching query does not exist."" %
}}}"	Cleanup/optimization	closed	Database layer (models, ORM)	1.11	Normal	duplicate			Unreviewed	0	0	0	0	0	0
