Skip to content

Commit b44acfd

Browse files
committed
Fix bulk_update none counter
1 parent 8a13d5e commit b44acfd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mssql/functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,10 +246,10 @@ def bulk_update_with_default(self, objs, fields, batch_size=None, default=0):
246246
requires_casting = connections[self.db].features.requires_casted_case_in_updates
247247
batches = (objs[i:i + batch_size] for i in range(0, len(objs), batch_size))
248248
updates = []
249-
value_none_counter = 0
250249
for batch_objs in batches:
251250
update_kwargs = {}
252251
for field in fields:
252+
value_none_counter = 0
253253
when_statements = []
254254
for obj in batch_objs:
255255
attr = getattr(obj, field.attname)

0 commit comments

Comments
 (0)