Opened 8 years ago

Closed 8 years ago

#27204 closed Bug (fixed)

Clashing m2m intermediate table validation should ignore unmanaged models

Reported by: Tim Graham Owned by: nobody
Component: Core (System checks) Version: 1.10
Severity: Normal Keywords:
Cc: Berker Peksag 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

The check added in #12810 currently triggers on some unmanaged models in Django's test suite that intentionally use clashing names. I think the correct solution is to ignore unmanaged models.

ERRORS:
model_options.Article.authors: (fields.E340) The field's intermediary table 'model_options_articleref_authors' clashes with the table name of 'model_options.ArticleRef.authors'.
model_options.Article.reviewers: (fields.E340) The field's intermediary table 'model_options_articleref_reviewers' clashes with the table name of 'model_options.ArticleRef.reviewers'.
model_options.ArticleRef.authors: (fields.E340) The field's intermediary table 'model_options_articleref_authors' clashes with the table name of 'model_options.Article.authors'.
model_options.ArticleRef.reviewers: (fields.E340) The field's intermediary table 'model_options_articleref_reviewers' clashes with the table name of 'model_options.Article.reviewers'.
unmanaged_models.C01.mm_a: (fields.E340) The field's intermediary table 'd01' clashes with the table name of 'unmanaged_models.Intermediate'.
unmanaged_models.C02.mm_a: (fields.E340) The field's intermediary table 'd01' clashes with the table name of 'unmanaged_models.C01.mm_a'.

Attachments (1)

27204.diff (920 bytes ) - added by Tim Graham 8 years ago.
patch without tests

Download all attachments as: .zip

Change History (4)

by Tim Graham, 8 years ago

Attachment: 27204.diff added

patch without tests

comment:1 by Tim Graham, 8 years ago

Needs tests: unset

comment:2 by Berker Peksag, 8 years ago

Triage Stage: AcceptedReady for checkin

PR #7224 looks good to me and tests passed on my system. Just left a comment about a potential typo on GitHub.

comment:3 by Tim Graham <timograham@…>, 8 years ago

Resolution: fixed
Status: newclosed

In e7abb5ba:

Fixed #27204 -- Made clashing m2m intermediary table checks ignore unmanaged models.

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