Skip to content

Conversation

UnknownPlatypus
Copy link
Contributor

I have made things!

Mostly mirrors validation logic from django.db.models.query.QuerySet.bulk_update.
Tests are inspired from django/tests/queries/test_bulk_update.py

I could have called a dummy bulk_update with no objects to reuse django internal logic but it felt brittle with risk of someday actually do database query so I preferred to re-implement the few checks

Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, also test at least one nested__field error. It is not supported by django.

Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

@sobolevn sobolevn merged commit 736e30f into typeddjango:master Oct 5, 2025
39 checks passed
@UnknownPlatypus UnknownPlatypus deleted the validate-bulk-update-fields branch October 5, 2025 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants