Re: [Django] #36550: AssertionError raised when bulk creation model with primary key set via pre_save (e.g. auto_now_add) on databases with can_return_columns_from_insert (was: AssertionError raised when bulk creation model with primary key set via pre_save (e.g. auto_now_add))

1 view
Skip to first unread message

Django

unread,
Aug 14, 2025, 9:41:13 AMAug 14
to django-...@googlegroups.com
#36550: AssertionError raised when bulk creation model with primary key set via
pre_save (e.g. auto_now_add) on databases with
can_return_columns_from_insert
-------------------------------------+-------------------------------------
Reporter: Will-Ruddick | Owner: (none)
Type: Bug | Status: new
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | 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 Sarah Boyce):

* resolution: wontfix =>
* status: closed => new
* summary:
AssertionError raised when bulk creation model with primary key set
via pre_save (e.g. auto_now_add)
=>
AssertionError raised when bulk creation model with primary key set
via pre_save (e.g. auto_now_add) on databases with
can_return_columns_from_insert
* version: 5.2 => dev

Comment:

Looked into it more and found this is only an issue for databases with
`can_return_columns_from_insert` set to `True` (so is allowed on MySQL for
example)
--
Ticket URL: <https://code.djangoproject.com/ticket/36550#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Reply all
Reply to author
Forward
0 new messages