#36704: Proxy model with a CompositePrimaryKey fails system check with false
positive: (models.E042) '<field>' cannot be included in the composite
primary key
--------------------------------------+------------------------------------
Reporter: Hal Blackburn | Owner: (none)
Type: Bug | Status: new
Component: Core (System checks) | Version: 5.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Clifford Gama):
* has_patch: 1 => 0
* stage: Unreviewed => Accepted
Comment:
Thanks for the report!
Would you like to prepare a patch?
Since `_check_composite_pk()`
[https://github.com/django/django/blob/05ba1a9228128614fb3c475f1c4bdf0160f44dba/django/db/models/base.py#L1799
has no proxy-model specific checks], we may also choose to skip the checks
for proxy models. This would fix this issue and prevent duplicate errors
reports when there are errors.
--
Ticket URL: <https://code.djangoproject.com/ticket/36704#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/0107019a49076145-887961e6-4a5f-4d06-aa9b-9080dbc947d1-000000%40eu-central-1.amazonses.com.