Code

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#3118 closed defect (fixed)

[patch] errata in UPDATE/INSERT section in DB-API document

Reported by: makoto tsuyuki <mtsuyuki@…> Owned by: jacob
Component: Documentation Version: master
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Isn't this opposite?

django/doc/db-api.txt

line 145

  • If the object's primary key attribute is set to a value that evaluates to False (such as None or the empty string), Django executes a SELECT query to determine whether a record with the given primary key already exists.

Attachments (2)

fixing_dbapi_doc_erratta.txt (995 bytes) - added by ymasuda <ymasuda@…> 7 years ago.
Fixing errata on db-api.txt documentation.
fixing_dbapi_doc_erratta.diff (995 bytes) - added by ymasuda <ymasuda@…> 7 years ago.
Fixing errata on db-api.txt documentation (file extension was corrected to .diff sorry for noise).

Download all attachments as: .zip

Change History (8)

comment:1 Changed 7 years ago by ymasuda <ymasuda@…>

According to a codepath and comment on http://code.djangoproject.com/browser/django/trunk/django/db/models/base.py, lines 172-212,
This should be corrected such as "If the object's primary key attribute is set to a value that evaluates to True (whatever excluding None or empty string), Django executes a ...".
I'll post a patch soon.

Changed 7 years ago by ymasuda <ymasuda@…>

Fixing errata on db-api.txt documentation.

comment:2 Changed 7 years ago by ymasuda <ymasuda@…>

  • Summary changed from DB-API document has description bug. to [patch] DB-API document has description bug.

comment:3 Changed 7 years ago by ymasuda <ymasuda@…>

  • Summary changed from [patch] DB-API document has description bug. to [patch] errata in UPDATE/INSERT section in DB-API document

Changed 7 years ago by ymasuda <ymasuda@…>

Fixing errata on db-api.txt documentation (file extension was corrected to .diff sorry for noise).

comment:4 Changed 7 years ago by russellm

  • Resolution set to fixed
  • Status changed from new to closed

(In [4221]) Fixed #3118 -- Fixed reversed logic in DBAPI regarding handling of empty PKs on save(). Thanks, Makoto Tsuyuki.

comment:5 Changed 7 years ago by russellm

(In [4222]) Refs #3118 -- Forgot to mention the efforts of Yashudi Masuda in triaging #3118, committed as [4221]. Thanks!

comment:6 Changed 7 years ago by russellm

That should be Yasushi Masuda. Apologies for getting your name wrong in the commit message.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.