Re: [Django] #37238: save() falls back to python default even when DatabaseDefault instance is assigned

4 views
Skip to first unread message

Django

unread,
Jul 29, 2026, 1:43:39 PM (5 days ago) Jul 29
to django-...@googlegroups.com
#37238: save() falls back to python default even when DatabaseDefault instance is
assigned
-------------------------------------+-------------------------------------
Reporter: Jacob Walls | Owner: Jacob
| Walls
Type: Bug | Status: assigned
Component: Database layer | Version: 6.1
(models, ORM) |
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* needs_docs: 0 => 1
* stage: Unreviewed => Accepted
* status: new => assigned

--
Ticket URL: <https://code.djangoproject.com/ticket/37238#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jul 29, 2026, 6:07:05 PM (4 days ago) Jul 29
to django-...@googlegroups.com
#37238: save() falls back to python default even when DatabaseDefault instance is
assigned
-------------------------------------+-------------------------------------
Reporter: Jacob Walls | Owner: Jacob
| Walls
Type: Bug | Status: assigned
Component: Database layer | Version: 6.1
(models, ORM) |
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):

* needs_docs: 1 => 0

Comment:

Added a release note and versionchanged for the `_is_pk_set()` change from
#37139 (good idea!). Let me know if you had something else in mind.
--
Ticket URL: <https://code.djangoproject.com/ticket/37238#comment:8>

Django

unread,
Jul 31, 2026, 3:46:07 AM (3 days ago) Jul 31
to django-...@googlegroups.com
#37238: save() falls back to python default even when DatabaseDefault instance is
assigned
-------------------------------------+-------------------------------------
Reporter: Jacob Walls | Owner: Jacob
| Walls
Type: Bug | Status: assigned
Component: Database layer | Version: 6.1
(models, ORM) |
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce):

* stage: Accepted => Ready for checkin

--
Ticket URL: <https://code.djangoproject.com/ticket/37238#comment:9>

Django

unread,
Jul 31, 2026, 3:52:46 AM (3 days ago) Jul 31
to django-...@googlegroups.com
#37238: save() falls back to python default even when DatabaseDefault instance is
assigned
-------------------------------------+-------------------------------------
Reporter: Jacob Walls | Owner: Jacob
| Walls
Type: Bug | Status: closed
Component: Database layer | Version: 6.1
(models, ORM) |
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce <42296566+sarahboyce@…>):

* resolution: => fixed
* status: assigned => closed

Comment:

In [changeset:"9465349120ef8a0b0689e12bcbfd05f3d173ebdf" 9465349]:
{{{#!CommitTicketReference repository=""
revision="9465349120ef8a0b0689e12bcbfd05f3d173ebdf"
Fixed #37238 -- Prevented fallback to python default for a pk with a
db_default.

Regression in a2348c85fc6c20087935c74cd99340dd4ef2dcdc.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/37238#comment:10>

Django

unread,
Jul 31, 2026, 3:54:31 AM (3 days ago) Jul 31
to django-...@googlegroups.com
#37238: save() falls back to python default even when DatabaseDefault instance is
assigned
-------------------------------------+-------------------------------------
Reporter: Jacob Walls | Owner: Jacob
| Walls
Type: Bug | Status: closed
Component: Database layer | Version: 6.1
(models, ORM) |
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Sarah Boyce <42296566+sarahboyce@…>):

In [changeset:"c6e5cf926db949d72842a48b926da57a9593dbd1" c6e5cf9]:
{{{#!CommitTicketReference repository=""
revision="c6e5cf926db949d72842a48b926da57a9593dbd1"
[6.1.x] Fixed #37238 -- Prevented fallback to python default for a pk with
a db_default.

Regression in a2348c85fc6c20087935c74cd99340dd4ef2dcdc.

Backport of 9465349120ef8a0b0689e12bcbfd05f3d173ebdf from main.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/37238#comment:11>
Reply all
Reply to author
Forward
0 new messages