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 , 4 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 4 years ago
comment:4 by , 4 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
Note:
See TracTickets
for help on using tickets.
Here is the patch:
https://github.com/django/django/pull/13349