File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -552,9 +552,8 @@ object's primary key attribute does **not** define a
552
552
:attr:`~django.db.models.Field.default` or
553
553
:attr:`~django.db.models.Field.db_default`, Django follows this algorithm:
554
554
555
- * If the object's primary key attribute is set to a value that evaluates to
556
- ``True`` (i.e., a value other than ``None`` or the empty string), Django
557
- executes an ``UPDATE``.
555
+ * If the object's primary key attribute is set to anything except ``None``,
556
+ Django executes an ``UPDATE``.
558
557
* If the object's primary key attribute is *not* set or if the ``UPDATE``
559
558
didn't update anything (e.g. if primary key is set to a value that doesn't
560
559
exist in the database), Django executes an ``INSERT``.
You can’t perform that action at this time.
0 commit comments