#25128: SQLite SchemaEditor crashes when adding a ForeignObject field
--------------------------------------+---------------------------
Reporter: timgraham | Owner: timgraham
Type: Bug | Status: new
Component: Migrations | Version: 1.8
Severity: Normal | Keywords:
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
--------------------------------------+---------------------------
Adding a `ForeignObject` field to an existing model will fail like this on
SQLite:
{{{
======================================================================
ERROR: test_add_foreign_object (schema.tests.SchemaTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/tim/code/django/tests/schema/tests.py", line 1518, in
test_add_foreign_object
editor.add_field(BookForeignObj, new_field)
File "/home/tim/code/django/django/db/backends/sqlite3/schema.py", line
221, in add_field
self._remake_table(model, create_fields=[field])
File "/home/tim/code/django/django/db/backends/sqlite3/schema.py", line
187, in _remake_table
', '.join(self.quote_name(x) for x, y in field_maps),
File "/home/tim/code/django/django/db/backends/sqlite3/schema.py", line
187, in <genexpr>
', '.join(self.quote_name(x) for x, y in field_maps),
File "/home/tim/code/django/django/db/backends/base/schema.py", line
113, in quote_name
return self.connection.ops.quote_name(name)
File "/home/tim/code/django/django/db/backends/sqlite3/operations.py",
line 107, in quote_name
if name.startswith('"') and name.endswith('"'):
AttributeError: 'NoneType' object has no attribute 'startswith'
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25128>
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/052.cf37a4109c1e85a4b0f25daabf4a90c7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.