Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#22906 closed New feature (fixed)

Give ModelState a __repr__()

Reported by: Collin Anderson Owned by: nobody
Component: Migrations Version: 1.7-beta-2
Severity: Normal Keywords:
Cc: cmawebsite@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: yes Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I've gotten a number of InvalidBasesError("Cannot resolve bases for %r" % new_unrendered_models) errors. Could we make a repr for ModelState objects?

Change History (5)

comment:1 Changed 2 years ago by Collin Anderson

Summary: ModelState.__repr__Give ModelState a __repr__()
Type: UncategorizedNew feature

comment:2 Changed 2 years ago by Claude Paroz

Needs tests: set
Triage Stage: UnreviewedAccepted

comment:3 Changed 2 years ago by Loic Bistuer <loic.bistuer@…>

Resolution: fixed
Status: newclosed

In 2572c07cc64177e985b453d0f0b819e85fe080cc:

Fixed #22906 -- Added a more helpful repr to migrations' ModelState.

Thanks Collin Anderson for the report and original patch.

comment:4 Changed 2 years ago by Loic Bistuer <loic.bistuer@…>

In a1ddfe440151c81898b94df4d5ea99696398c3f7:

[1.7.x] Fixed #22906 -- Added a more helpful repr to migrations' ModelState.

Thanks Collin Anderson for the report and original patch.

Backport of 2572c07cc6 from master

comment:5 Changed 2 years ago by Collin Anderson

This is perfect. Thanks so much all.

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