#29814: Allow serializing NoneType in migrations
-------------------------------------+-------------------------------------
     Reporter:  Daan van der Kallen  |                    Owner:  Patrik
                                     |  Sletmo
         Type:  Bug                  |                   Status:  assigned
    Component:  Migrations           |                  Version:  2.1
     Severity:  Normal               |               Resolution:
     Keywords:  migration            |             Triage Stage:  Accepted
  deconstruct nonetype none          |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Patrik Sletmo):

 * status:  new => assigned
 * owner:  nobody => Patrik Sletmo


Comment:

 I've managed to reproduce the issue and will attempt to provide a patch
 later this week. If anyone is interested in reproducing the issue on their
 own, the following code generates a problematic migration:


 {{{
 from django.db import models
 from django.utils.deconstruct import deconstructible


 @deconstructible
 class SerializableClass:
     def __init__(self, foo):
         self.foo = foo


 class DemoModel(models.Model):
     problematic_field =
 models.Field(default=SerializableClass(type(None)))

 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29814#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 [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/065.0ca13fe7b4d6a80104a2bfa148d7e668%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to