#36550: AssertionError raised when bulk creation model with primary key set via pre_save (e.g. auto_now_add) -------------------------------------+------------------------------------- Reporter: Will-Ruddick | Owner: (none) Type: Bug | Status: closed Component: Database layer | Version: 5.2 (models, ORM) | Severity: Normal | Resolution: wontfix Keywords: | Triage Stage: Accepted Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Comment (by Jacob Walls):
Wanted to mention that there's a difference between the model `pre_save` signal and the `Field.pre_save()` method. Looks like `bulk_create()` has always used the `pre_save()` value, so that part is not a new feature. It might be worth evaluating this a little further, as from the docs I don't see an admonition about this not working (happy to be corrected on this). -- Ticket URL: <https://code.djangoproject.com/ticket/36550#comment:6> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/django-updates/01070198a8b5144f-e1aaa46b-8443-494a-9643-381a74e6a501-000000%40eu-central-1.amazonses.com.