Changes between Initial Version and Version 1 of Ticket #28431


Ignore:
Timestamp:
Jul 24, 2017, 10:20:30 AM (7 years ago)
Author:
James
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #28431 – Description

    initial v1  
    7575
    7676
     77== Notes ==
     78site-packages\django\db\backends\base\shema.py {{{ def effective_default(self, field): }}}
     79
     80determines default as an empty <class 'str'>, when  {{{(default = '')}}}
     81
     82== Possible Fix? ==
     83site-packages\django\db\backends\base\shema.py ~line 197
     84
     85{{{
     86def effective_default(self, field):
     87        if field.has_default():
     88            default = field.get_default()
     89            if field.get_internal_type() == "BinaryField" and not default:
     90                default = six.binary_type()
     91        elif not field.null and field.blank and field.empty_strings_allowed:
     92            if field.get_internal_type() == "BinaryField":
     93                default = six.binary_type()
     94            else:
     95                default = six.text_type()
     96        elif getattr(field, 'auto_now', False)
     97}}}
Back to Top