Opened 5 years ago

Closed 5 years ago

#30757 closed Cleanup/optimization (fixed)

Add check to ensure max_length fits longest choice.

Reported by: Nick Pope Owned by: Nick Pope
Component: Core (System checks) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

There is currently no check to ensure that Field.max_length is large enough to fit the longest value in Field.choices.

This would be very helpful as often this mistake is not noticed until an attempt is made to save a record with those values that are too long.

Change History (3)

comment:1 by Nick Pope, 5 years ago

Has patch: set

comment:2 by Mariusz Felisiak, 5 years ago

Triage Stage: UnreviewedAccepted

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

Resolution: fixed
Status: assignedclosed

In b6251956:

Fixed #30757 -- Added a system check to ensure max_length fits the longest choice.

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