chipx86 got a fish trophy!
Fix a regression with creating pending references to models on Django 1.6.
Review Request #10601 — Created June 18, 2019 and submitted — Latest diff uploaded
A recent change to split
sql_create_models()
passed the wrong model to
a call tosql_for_pending_references()
, which resulted in some bad SQL
that would break on MySQL. We were executing SQL for creating pending
references on the model being created when we meant to do that for
models being referenced by the model (via aForeignKey
or similar
fields). This change fixes that variable, fixing all tests.
All unit tests pass for all databases.