mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +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:
parent
6d256ae248
commit
746f2a4bed
4 changed files with 14 additions and 1 deletions
|
@ -265,3 +265,9 @@ class SelectForUpdateTests(TransactionTestCase):
|
|||
self.assertEqual(router.db_for_write(Person), query.db)
|
||||
finally:
|
||||
router.routers = old_routers
|
||||
|
||||
@skipUnlessDBFeature('has_select_for_update')
|
||||
def test_select_for_update_with_get(self):
|
||||
with transaction.atomic():
|
||||
person = Person.objects.select_for_update().get(name='Reinhardt')
|
||||
self.assertEqual(person.name, 'Reinhardt')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue