Opened 4 years ago

Last modified 4 years ago

#32321 closed Cleanup/optimization

Add system checks for invalid model field names for functional indexes in Meta.indexes. — at Initial Version

Reported by: Mariusz Felisiak Owned by: nobody
Component: Database layer (models, ORM) Version: 3.1
Severity: Normal Keywords:
Cc: Hannes Ljungberg Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The current system checks don't cover invalid models fields in functional indexes. This is not straightforward because resolving expressions with non-existent throws FieldError, so we cannot just collect columns from Query._gen_cols().

I attached tests.

Change History (1)

by Mariusz Felisiak, 4 years ago

Attachment: tests_32321.diff added

Tests.

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