mirror of
				https://github.com/django/django.git
				synced 2025-10-29 08:36:09 +00:00 
			
		
		
		
	Fixed #23061: Avoided setting a limit on a query for get with select_for_update on Oracle
Thanks Michael Miller for reporting the issue.
This commit is contained in:
		| @@ -357,7 +357,9 @@ class QuerySet(object): | ||||
|         clone = self.filter(*args, **kwargs) | ||||
|         if self.query.can_filter(): | ||||
|             clone = clone.order_by() | ||||
|         clone = clone[:MAX_GET_RESULTS + 1] | ||||
|         if (not clone.query.select_for_update or | ||||
|             connections[self.db].features.supports_select_for_update_with_limit): | ||||
|             clone = clone[:MAX_GET_RESULTS + 1] | ||||
|         num = len(clone) | ||||
|         if num == 1: | ||||
|             return clone._result_cache[0] | ||||
|   | ||||
		Reference in New Issue
	
	Block a user