Opened 3 years ago

Closed 3 years ago

#33131 closed Cleanup/optimization (fixed)

Improve error messages for reverse accessor clashes.

Reported by: Bernd Wechner Owned by: Bernd Wechner
Component: Core (System checks) Version: 3.2
Severity: Normal Keywords:
Cc: 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

refer: https://github.com/django/django/pull/14880

RelatedField._check_clashes() provides feedback when it finds a clash, but fails to mentioned what the clashing name was. This cost me some significant time to track because of inadequate feedback and would have become immediately clear had the feedback listed the clashing name.

A proposed patch appears above, but alas this impacts some unit tests as well. Happy to add fixes to those to the patch, but have been requested to file and issue here.

Change History (3)

comment:1 by Mariusz Felisiak, 3 years ago

Component: UncategorizedCore (System checks)
Has patch: set
Needs documentation: set
Owner: changed from nobody to Bernd Wechner
Patch needs improvement: set
Status: newassigned
Summary: Improve Reverse Accessor Clash feedbackImprove error messages for reverse accessor clashes.
Triage Stage: UnreviewedAccepted
Type: UncategorizedCleanup/optimization

Thanks for the ticket. We should also update the message for fields.E302.

PR

comment:2 by Mariusz Felisiak, 3 years ago

Needs documentation: unset
Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

comment:3 by Mariusz Felisiak <felisiak.mariusz@…>, 3 years ago

Resolution: fixed
Status: assignedclosed

In 2116238:

Fixed #33131 -- Improved error messages for clashing reverse accessor names.

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