Opened 14 years ago
Closed 10 years ago
#16867 closed New feature (fixed)
Validate GenericForeignKey's object_id_field/content_type_field options
| Reported by: | Jacob | Owned by: | nobody |
|---|---|---|---|
| Component: | contrib.contenttypes | Version: | 1.3 |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description (last modified by )
See #7800
The object_id_field and content_type_field options to GenericForeignKey aren't validated by model validation, which means that if you make a mistake or typo weird stuff happens. ./manage.py validate should complain about that.
I think this is probably blocking on the ability to plug into model validation since GFK's are in contrib and shouldn't have code in core.
Change History (3)
comment:1 by , 14 years ago
comment:2 by , 13 years ago
| Description: | modified (diff) |
|---|
comment:3 by , 10 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
| Type: | Bug → New feature |
Validation for these fields was added in Django 1.7 in the initial version of the checks framework, d818e0c9b2b88276cc499974f9eee893170bf0a8.
Yes, see #16283 for why validation of contrib.contenttypes stuff is problematic at the moment.