#28980: Make the autodetector validate the type of one-off default values
--------------------------------------+------------------------------------
     Reporter:  Nikos Katsos          |                    Owner:  (none)
         Type:  Cleanup/optimization  |                   Status:  new
    Component:  Migrations            |                  Version:  2.0
     Severity:  Normal                |               Resolution:
     Keywords:                        |             Triage Stage:  Accepted
    Has patch:  0                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------

Comment (by Tim Graham):

 The value comes from `return_value='1'`. That test could be updated to use
 a valid value, however, it seems that `DateTimeField.to_python()` (and all
 `to_python()` methods) would need to be able to handle arbitrary Python
 types (and raise `ValidationError`) -- which may be difficult -- unless
 there's some broader exception catching in the migrations questioner.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28980#comment:5>
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.2241c8f83a66672b8e535a9909d948d1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to