8000 Bulk update doesn't work with 4.2+ · Issue #1924 · django-extensions/django-extensions · GitHub
[go: up one dir, main page]

Skip to content

Bulk update doesn't work with 4.2+ #1924

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
kviktor opened this issue Apr 9, 2025 · 3 comments
Closed

Bulk update doesn't work with 4.2+ #1924

kviktor opened this issue Apr 9, 2025 · 3 comments

Comments

@kviktor
Copy link
Contributor
kviktor commented Apr 9, 2025

I have a code that does XY.objects.bulk_update(objects, ["data"]) where data is a django extensions JSONField. The code breaks with TypeError: Object of type Cast is not JSON serializable. On 3.2 it is working properly.

I've added a dummy print into django_extensions/db/fields/json.py into the JSONField's get_db_prep_save and the type of value is <class 'django.db.models.functions.comparison.Cast'>.

@trbs
Copy link
Member
trbs commented Apr 9, 2025

Could you please test with 067064e ?

@kviktor
Copy link
Contributor Author
kviktor commented Apr 10, 2025

Thank you, I can confirm that those changes fixed my issue.

Do you think you can do a new release for the changes?

7CB0

@kviktor kviktor closed this as completed Apr 10, 2025
@trbs
Copy link
Member
trbs commented Apr 10, 2025

Definitely, thanks for testing !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0