Re: [Django] #36550: AssertionError raised when bulk creation model with composite primary key with auto_now_add field

3 views
Skip to first unread message

Django

unread,
Aug 13, 2025, 5:14:19 PMAug 13
to django-...@googlegroups.com
#36550: AssertionError raised when bulk creation model with composite primary key
with auto_now_add field
-------------------------------------+-------------------------------------
Reporter: Will-Ruddick | Owner: (none)
Type: Bug | Status: new
Component: Database layer | Version: 5.2
(models, ORM) |
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jason Hall):

* Attachment "36550.patch" added.

--
Ticket URL: <https://code.djangoproject.com/ticket/36550>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Aug 13, 2025, 5:18:58 PMAug 13
to django-...@googlegroups.com
#36550: AssertionError raised when bulk creation model with composite primary key
with auto_now_add field
-------------------------------------+-------------------------------------
Reporter: Will-Ruddick | Owner: (none)
Type: Bug | Status: new
Component: Database layer | Version: 5.2
(models, ORM) |
Severity: Release blocker | Resolution:
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 Jason Hall):

Attached 36550.patch. The existing regression test for bulk_create() with
a composite PK containing an auto_now_add field now passes with this
change. This seems to fix the issue, but I’m not sure if this is the
preferred approach.
--
Ticket URL: <https://code.djangoproject.com/ticket/36550#comment:4>
Reply all
Reply to author
Forward
0 new messages