[Django] #30757: Add check to ensure max_length fits longest choice.

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Django] #30757: Add check to ensure max_length fits longest choice.

Django
#30757: Add check to ensure max_length fits longest choice.
-------------------------------------+-------------------------------------
               Reporter:  Nick Pope  |          Owner:  Nick Pope
                   Type:             |         Status:  assigned
  Cleanup/optimization               |
              Component:  Core       |        Version:  master
  (System checks)                    |
               Severity:  Normal     |       Keywords:
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 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.

--
Ticket URL: <https://code.djangoproject.com/ticket/30757>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/050.c98f70a0673aa822e876bc28fd876ae6%40djangoproject.com.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #30757: Add check to ensure max_length fits longest choice.

Django
#30757: Add check to ensure max_length fits longest choice.
-------------------------------------+-------------------------------------
     Reporter:  Nick Pope            |                    Owner:  Nick Pope
         Type:                       |                   Status:  assigned
  Cleanup/optimization               |
    Component:  Core (System         |                  Version:  master
  checks)                            |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Nick Pope):

 * has_patch:  0 => 1


Comment:

 [https://github.com/django/django/pull/11742 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/30757#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/065.cf04ce176689d9de9462a499a16517e1%40djangoproject.com.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #30757: Add check to ensure max_length fits longest choice.

Django
In reply to this post by Django
#30757: Add check to ensure max_length fits longest choice.
-------------------------------------+-------------------------------------
     Reporter:  Nick Pope            |                    Owner:  Nick Pope
         Type:                       |                   Status:  assigned
  Cleanup/optimization               |
    Component:  Core (System         |                  Version:  master
  checks)                            |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by felixxm):

 * stage:  Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/30757#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/065.b5db8925c04fb000b6577bc394367c33%40djangoproject.com.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #30757: Add check to ensure max_length fits longest choice.

Django
In reply to this post by Django
#30757: Add check to ensure max_length fits longest choice.
-------------------------------------+-------------------------------------
     Reporter:  Nick Pope            |                    Owner:  Nick Pope
         Type:                       |                   Status:  closed
  Cleanup/optimization               |
    Component:  Core (System         |                  Version:  master
  checks)                            |
     Severity:  Normal               |               Resolution:  fixed
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"b6251956b69512bf230322bd7a49b629ca8455c6" b6251956]:
 {{{
 #!CommitTicketReference repository=""
 revision="b6251956b69512bf230322bd7a49b629ca8455c6"
 Fixed #30757 -- Added a system check to ensure max_length fits the longest
 choice.
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/30757#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/065.b2b96527f4120592fa9c9e3518c3fb07%40djangoproject.com.