Opened 2 months ago

Closed 2 months ago

Last modified 2 months ago

#34177 closed Bug (fixed)

QuerySet.bulk_create() crashes on "pk" in unique_fields.

Reported by: Mariusz Felisiak Owned by: Mariusz Felisiak
Component: Database layer (models, ORM) Version: 4.1
Severity: Release blocker Keywords:
Cc: Chih Sean Hsu, Carlton Gibson Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Mariusz Felisiak)

QuerySet.bulk_create() crashes on "pk" in unique_fields which should be allowed.

  File "/django/django/db/backends/utils.py", line 89, in _execute
    return self.cursor.execute(sql, params)
django.db.utils.ProgrammingError: column "pk" does not exist
LINE 1: ...S (3127, 3, 3, 'c'), (3128, 4, 4, 'd') ON CONFLICT("pk") DO ...

Bug in 0f6946495a8ec955b471ca1baaf408ceb53d4796.

Change History (5)

comment:1 Changed 2 months ago by Mariusz Felisiak

Has patch: set

comment:2 Changed 2 months ago by Mariusz Felisiak

Description: modified (diff)

comment:3 Changed 2 months ago by Carlton Gibson

Triage Stage: UnreviewedReady for checkin

comment:4 Changed 2 months ago by GitHub <noreply@…>

Resolution: fixed
Status: assignedclosed

In 7d53298:

Fixed #34177 -- Fixed QuerySet.bulk_create() crash on "pk" in unique_fields.

Bug in 0f6946495a8ec955b471ca1baaf408ceb53d4796.

comment:5 Changed 2 months ago by Mariusz Felisiak <felisiak.mariusz@…>

In 3b0a8ea:

[4.1.x] Fixed #34177 -- Fixed QuerySet.bulk_create() crash on "pk" in unique_fields.

Bug in 0f6946495a8ec955b471ca1baaf408ceb53d4796.
Backport of 7d5329852f19c6ae78c6f6f3d3e41835377bf295 from main

Note: See TracTickets for help on using tickets.
Back to Top