(self, objs)
| 722 | acreate.alters_data = True |
| 723 | |
| 724 | def _prepare_for_bulk_create(self, objs): |
| 725 | objs_with_pk, objs_without_pk = [], [] |
| 726 | for obj in objs: |
| 727 | if isinstance(obj.pk, DatabaseDefault): |
| 728 | objs_without_pk.append(obj) |
| 729 | elif obj._is_pk_set(): |
| 730 | objs_with_pk.append(obj) |
| 731 | else: |
| 732 | obj.pk = obj._meta.pk.get_pk_value_on_save(obj) |
| 733 | if obj._is_pk_set(): |
| 734 | objs_with_pk.append(obj) |
| 735 | else: |
| 736 | objs_without_pk.append(obj) |
| 737 | obj._prepare_related_fields_for_save(operation_name="bulk_create") |
| 738 | return objs_with_pk, objs_without_pk |
| 739 | |
| 740 | def _check_bulk_create_options( |
| 741 | self, ignore_conflicts, update_conflicts, update_fields, unique_fields |
no test coverage detected