Mysql validator crashes with None db_type return. - Backport of master fix to 1.7
When implementing a custom field type with a db_type() method that returns None, on Django 1.6 and below we would signify not to create a column at all.
With Django 1.7, this causes a crash with the mysql backend.
The issue is already fixed in master and this simply backports the safety check.
A fix was made in August in master:
https://github.com/django/django/commit/e9103402c0fa873aea58a6a11dba510cd308cb84#diff-14
The fix contains a lot more than is needed for this specific issue, however the specific changes to django/db/backends/mysql/validation.py would be great to have in Django 1.7.
This worked fine in < Django 1.7 and works fine in upstream.
Change History
(9)
Component: |
Uncategorized → Core (System checks)
|
Easy pickings: |
set
|
Description: |
modified (diff)
|
Description: |
modified (diff)
|
Easy pickings: |
unset
|
Needs tests: |
set
|
Severity: |
Normal → Release blocker
|
Triage Stage: |
Unreviewed → Accepted
|
Needs tests: |
unset
|
Owner: |
changed from nobody to Tim Graham
|
Status: |
new → assigned
|
Resolution: |
→ fixed
|
Status: |
assigned → closed
|
Backport fix PR'd here:
https://github.com/django/django/pull/3471