Commits

Andrew Godwin committed 8e3ad05

Fix for SQLite name quoting (#219)

  • Participants
  • Parent commits 9e2c382

Comments (0)

Files changed (1)

File south/db/sqlite3.py

         qn = connection.ops.quote_name
         q_fields = [qn(field) for field in fields]
         for key, value in field_renames.items():
-            q_fields[q_fields.index(value)] = "%s AS %s" % (qn(key), qn(value))
+            q_fields[q_fields.index(qn(value))] = "%s AS %s" % (qn(key), qn(value))
         sql = "INSERT INTO %s SELECT %s FROM %s;" % (qn(dst), ', '.join(q_fields), qn(src))
         self.execute(sql)