Opened 2 months ago

Closed 2 months ago

Last modified 2 months ago

#36730 closed Bug (fixed)

Model validation of constraints fails for *excluded* ForeignKeys referenced by attname

Reported by: Adam Johnson Owned by: Adam Johnson
Component: Database layer (models, ORM) Version: 6.0
Severity: Release blocker Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Adam Johnson)

Like #36433, but for the case where the foreign gets excluded by the form due to already being invalid. Another 6.0 release blocker, as forms that would validate before now crash with FieldError. Bisected to e44e8327d3d88d86895735c0e427102063ff5b55 as well.

Reproduction repository: https://github.com/adamchainz/django-ticket-36730

Change History (6)

comment:1 by Adam Johnson, 2 months ago

Description: modified (diff)

comment:2 by Jacob Walls, 2 months ago

Triage Stage: UnreviewedAccepted

Thanks for the repro!

comment:3 by Jacob Walls, 2 months ago

Patch needs improvement: set

comment:4 by Mariusz Felisiak, 2 months ago

Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

comment:5 by Mariusz Felisiak <felisiak.mariusz@…>, 2 months ago

Resolution: fixed
Status: assignedclosed

In abfa461:

Fixed #36730 -- Fixed constraint validation crash for excluded FK attnames.

Regression in e44e8327d3d88d86895735c0e427102063ff5b55.

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@…>

comment:6 by Mariusz Felisiak <felisiak.mariusz@…>, 2 months ago

In 5ae8659:

[6.0.x] Fixed #36730 -- Fixed constraint validation crash for excluded FK attnames.

Regression in e44e8327d3d88d86895735c0e427102063ff5b55.

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@…>

Backport of abfa4619fb818ff694c22e962a280673e085239e from main

Note: See TracTickets for help on using tickets.
Back to Top