Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #3118 -- Fixed reversed logic in DBAPI regarding handling of em…

…pty PKs on save(). Thanks, Makoto Tsuyuki.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@4221 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 94edd4b81fdbba1b15f86e9327d24c80c9df7e50 1 parent a0ef6f6
@freakboy3742 freakboy3742 authored
Showing with 4 additions and 3 deletions.
  1. +1 −0  AUTHORS
  2. +3 −3 docs/db-api.txt
View
1  AUTHORS
@@ -160,6 +160,7 @@ answer newbie questions, and generally made Django that much better:
Tom Insam
Joe Topjian <http://joe.terrarum.net/geek/code/python/django/>
Karen Tracey <graybark@bellsouth.net>
+ Makoto Tsuyuki <mtsuyuki@gmail.com>
Amit Upadhyay
Geert Vanderkelen
Milton Waddams
View
6 docs/db-api.txt
@@ -143,9 +143,9 @@ or ``UPDATE`` SQL statements. Specifically, when you call ``save()``, Django
follows this algorithm:
* 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.
+ ``True`` (i.e., a value other than ``None`` or the empty string), Django
+ executes a ``SELECT`` query to determine whether a record with the given
+ primary key already exists.
* If the record with the given primary key does already exist, Django
executes an ``UPDATE`` query.
* If the object's primary key attribute is *not* set, or if it's set but a
Please sign in to comment.
Something went wrong with that request. Please try again.