Skip to content

"update_fields" option to "bulk_create" not supported? #1323

@elserj

Description

@elserj

Problem Statement
Using the "update_fields" option when using "bulk_create_with history" doesn't seem to be supported.

Describe the solution you'd like
Ideally, I'd actually like if a new option was added that didn't add a history record if a new model is added, but if it is updated the history is also.

Describe alternatives you've considered

Additional context
The "update_fields" option was added to "bulk_create" in Django 4.1 (https://docs.djangoproject.com/en/4.1/ref/models/querysets/#bulk-create), but I don't see a corresponding change in the "bulk_create_with_history".

I don't actually use the "bulk_create_with_history" as I only actually want changes to the history made after initial load. What I'd like to see is an "bulk_create_with_history" to have the additional ability to handle the "update_conflicts/update_fields" options, with an additional option to only create history records for updates, but not for new models.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions