Skip to content

Commit

Permalink
Fix bulk_update
Browse files Browse the repository at this point in the history
  • Loading branch information
abvf committed Aug 1, 2024
1 parent 3b620e4 commit 1bf6b04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tortoise/queryset.py
Original file line number Diff line number Diff line change
Expand Up @@ -1800,7 +1800,7 @@ def _make_query(self) -> None:
)
executor = self._db.executor_class(model=self.model, db=self._db)
pk_attr = self.model._meta.pk_attr
source_pk_attr = self.model._meta.fields_map["id"].source_field or pk_attr
source_pk_attr = self.model._meta.fields_map[pk_attr].source_field or pk_attr
pk = Field(source_pk_attr)
for objects_item in chunk(self.objects, self.batch_size):
query = copy(self.query)
Expand Down

0 comments on commit 1bf6b04

Please sign in to comment.