mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #22967 -- Made Model._do_update consistent
Made _do_update behave more strictly according to its docs, including a corner case when specific concurent updates are executed and select_on_save is set.
This commit is contained in:
committed by
Anssi Kääriäinen
parent
d647764a53
commit
c56c42b5c0
@@ -701,7 +701,7 @@ class SelectOnSaveTests(TestCase):
|
||||
try:
|
||||
Article._base_manager.__class__ = FakeManager
|
||||
asos = ArticleSelectOnSave.objects.create(pub_date=datetime.now())
|
||||
with self.assertNumQueries(2):
|
||||
with self.assertNumQueries(3):
|
||||
asos.save()
|
||||
self.assertTrue(FakeQuerySet.called)
|
||||
# This is not wanted behavior, but this is how Django has always
|
||||
|
||||
Reference in New Issue
Block a user