Opened 4 years ago

Closed 4 years ago

#31947 closed Cleanup/optimization (fixed)

QuerySet.update_or_create() should use get_or_create() internally

Reported by: homm Owned by: homm
Component: Database layer (models, ORM) Version: 3.1
Severity: Normal Keywords:
Cc: 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

QuerySet.update_or_create() internal method's logic perfectly repeats select_for_update().get_or_create() methods chain logic.

Change History (5)

comment:1 by homm, 4 years ago

Owner: changed from nobody to homm
Status: newassigned

comment:3 by Mariusz Felisiak, 4 years ago

Triage Stage: UnreviewedAccepted

Sounds reasonable.

comment:4 by Mariusz Felisiak, 4 years ago

Triage Stage: AcceptedReady for checkin

comment:5 by Mariusz Felisiak <felisiak.mariusz@…>, 4 years ago

Resolution: fixed
Status: assignedclosed

In 20d38fd7:

Fixed #31947 -- Made QuerySet.update_or_create() reuse get_or_create().

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