#35729: Subclasses cannot opt out of natural key serialization
-------------------------------------+-------------------------------------
Reporter: Jonas Dittrich | Owner: rimchoi
Type: Bug | Status: closed
Component: Core | Version: dev
(Serialization) |
Severity: Normal | 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 Jacob Walls <jacobtylerwalls@…>):
* resolution: => fixed
* status: assigned => closed
Comment:
In [changeset:"93540b34d4ef46f68df2c8bfe90447d0f649a852" 93540b34]:
{{{#!CommitTicketReference repository=""
revision="93540b34d4ef46f68df2c8bfe90447d0f649a852"
Fixed #35729 -- Enabled natural key serialization opt-out for subclasses.
Refactored serialization logic to allow models inheriting a natural_key()
method (e.g. AbstractBaseUser) to explicitly opt out of natural key
serialization by returning an empty tuple from the method.
Thanks Jonas Dittrich for the report.
Co-authored-by: Jacob Walls <
jacobty...@gmail.com>
}}}
--
Ticket URL: <
https://code.djangoproject.com/ticket/35729#comment:9>