mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Made QuerySet.bulk_update() raise an error when batch_size is zero.
This commit is contained in:
@@ -125,6 +125,8 @@ class BulkUpdateTests(TestCase):
|
||||
msg = "Batch size must be a positive integer."
|
||||
with self.assertRaisesMessage(ValueError, msg):
|
||||
Note.objects.bulk_update([], fields=["note"], batch_size=-1)
|
||||
with self.assertRaisesMessage(ValueError, msg):
|
||||
Note.objects.bulk_update([], fields=["note"], batch_size=0)
|
||||
|
||||
def test_nonexistent_field(self):
|
||||
with self.assertRaisesMessage(
|
||||
|
||||
Reference in New Issue
Block a user