Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#21010 closed Bug (fixed)

ModelState.fields contain fields from parents in MTI.

Reported by: loic84 Owned by: Tim Graham <timograham@…>
Component: Migrations Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

This causes FieldError: Local field 'field' in class 'Model1' clashes with field of similar name from base class 'Model2' when the ModelState is rendered.

Change History (3)

comment:2 by Tim Graham <timograham@…>, 11 years ago

Owner: set to Tim Graham <timograham@…>
Resolution: fixed
Status: newclosed

In 34d52fd32ed6192daa37e3fc1303cc5661130bad:

Fixed #21010 -- Changed ModelState to only copy _meta.local_fields.

comment:3 by Baptiste Mispelon <bmispelon@…>, 11 years ago

In 72479a29579f72a7713ac3c07eb92f5bafee25bd:

Made the migration detector use meta.local_fields instead of meta.fields.

Refs #21010.

Thanks to Loïc for the patch.

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