﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
12468	postgis backend has dummy return_insert_id(), making INSERTs fail.	drdaeman	nobody	"Because `django.db.backends.postgresql.operations.DatabaseOperations` has no proper `return_insert_id()`, but postgis imports `Database` from `django.db.backends.postgresql_psycopg2.base` and `connection.ops` has this feature, syncdb (and, probably, any INSERT, as this happened when syncdb tried to populate content-types table) fails with:
{{{
File "".../django/django/db/models/sql/compiler.py"", line 724, in as_sql
    r_fmt, r_params = self.connection.ops.return_insert_id()
TypeError: 'NoneType' object is not iterable
}}}
The reason for error is that `return_insert_id()` is just a `pass` dummy, returning `None`.

If my understanding is right, the attached patch to `django.contrib.gis.db.backends.postgis.operations` should fix the problem (at least, now `./manage.py syncdb` works)."		closed	GIS	dev		fixed	postgis db backend insert		Unreviewed	1	0	0	0	0	0
