Opened 11 years ago
Last modified 11 years ago
#23761 closed Bug
Mysql validator crashes with None db_type return. - Backport of master fix to 1.7 — at Initial Version
| Reported by: | Adam DePue | Owned by: | nobody |
|---|---|---|---|
| Component: | Core (System checks) | Version: | 1.7 |
| Severity: | Release blocker | Keywords: | mysql db_type |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
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
The issue is that if you create a custom field that returns None for db_type(), then it causes crashes due to dereference None to check the startswith().
This worked fine in < Django 1.7 and works fine in upstream.