Opened 5 weeks ago

Closed 4 weeks ago

Last modified 4 weeks ago

#36077 closed Cleanup/optimization (fixed)

Incorrect mention of falsey primary key values in save() documentation

Reported by: Jacob Walls Owned by: Jacob Walls
Component: Documentation Version: 5.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

This sentence in the description of save() is outdated since c2ba59fc1da5287d6286e2c2aca4083d5bafe056. We only consider a pk set if it's not None, as opposed to the empty string (before that commit) nor other falsey values like 0 (since forever, AFAICT).

PR

Found during PR discussion

Change History (3)

comment:1 by Tim Graham, 4 weeks ago

Triage Stage: UnreviewedReady for checkin

comment:2 by Sarah Boyce <42296566+sarahboyce@…>, 4 weeks ago

Resolution: fixed
Status: assignedclosed

In d66137b3:

Fixed #36077 -- Corrected docs on pk value where Model.save() executes an UPDATE.

The empty string is no longer special-cased since
c2ba59fc1da5287d6286e2c2aca4083d5bafe056.

comment:3 by Sarah Boyce <42296566+sarahboyce@…>, 4 weeks ago

In b325864:

[5.1.x] Fixed #36077 -- Corrected docs on pk value where Model.save() executes an UPDATE.

The empty string is no longer special-cased since
c2ba59fc1da5287d6286e2c2aca4083d5bafe056.

Backport of d66137b39b1503ca3d4d4fac687251adbc845068 from main.

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