mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Refs #36075 -- Adjusted pk_fields usage in bulk_update eligibility checks.
Regression in bf7b17d16d.
Thanks Sage Abdullah for the report.
This commit is contained in:
committed by
Sarah Boyce
parent
4bfec242b4
commit
161e79d277
@@ -144,6 +144,10 @@ class BulkUpdateTests(TestCase):
|
||||
with self.assertRaisesMessage(ValueError, self.pk_fields_error):
|
||||
CustomPk.objects.bulk_update([], ["name"])
|
||||
|
||||
def test_update_inherited_primary_key(self):
|
||||
with self.assertRaisesMessage(ValueError, self.pk_fields_error):
|
||||
SpecialCategory.objects.bulk_update([], ["id"])
|
||||
|
||||
def test_empty_objects(self):
|
||||
with self.assertNumQueries(0):
|
||||
rows_updated = Note.objects.bulk_update([], ["note"])
|
||||
|
||||
Reference in New Issue
Block a user