Changes between Initial Version and Version 2 of Ticket #36093


Ignore:
Timestamp:
Jan 13, 2025, 10:09:32 AM (31 hours ago)
Author:
Sage Abdullah
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #36093

    • Property Summary Calling `full_clean()` on an existing child model instance in a multi-table inheritance should not execute a database query.Calling full_clean() on an existing child model instance in a multi-table inheritance should not execute a database query.
  • Ticket #36093 – Description

    initial v2  
    2323}}}
    2424
    25 This is because the primary key of a child model is a `OneToOneField` to the parent model (e.g. `place_ptr`), and it's not in `pk_fields`, so the changes to [https://github.com/django/django/blob/bf7b17d16d3978b2e1cee4a0f7ce8840bd1a8dc4/django/db/models/base.py#L1496-L1498 the check for the check for skipping primary key when editing] no longer passes for child models.
     25This is because the primary key of a child model is a `OneToOneField` to the parent model (e.g. `place_ptr`), and it's not in `pk_fields`, so the changes to [https://github.com/django/django/blob/bf7b17d16d3978b2e1cee4a0f7ce8840bd1a8dc4/django/db/models/base.py#L1496-L1498 the check for skipping primary key when editing] no longer passes for child models.
     26
     27The exact query can be seen in [https://github.com/laymonage/django-fullclean-repro/actions/runs/12750852443/job/35536526461 my repro example].
Back to Top