#23909: RunSQL calls execute with params None, params used in map
----------------------------------------------+------------------------
Reporter: yarbelk | Owner: nobody
Type: Bug | Status: new
Component: Database layer (models, ORM) | Version: 1.7
Severity: Normal | Keywords: migrations
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------------------+------------------------
with a migration operation:
{{{
migrations.RunSQL(
"""CREATE TABLE ...; CREATE TABLE...; """,
"""DROP TABLE ...; DROP TABLE...;"""",
state_operations=[list of the equivalent migrations])
}}}
calling migrate on this gives me a TypeError on line in
django.db.backends.schema.execute():96
{{{
self.collected_sql.append((sql % tuple(map(self.quote_value, params)))
+ ';')
}}}
But this is being called by django.db.migrations.operations.special:69
{{{
schema_editor.execute(statement, params=None)
}}}
This will always fail if it is called so - None never being itterable.
the method signature for {{{django.db.backends.schema.execute(sql,
params=[])}}} should be enough rather than calling with None.
--
Ticket URL: <https://code.djangoproject.com/ticket/23909>
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/050.fa3a63e15c0ea69e49f85adab82d99b1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.