diff --git a/django/db/backends/__init__.py b/django/db/backends/__init__.py
index 2762350..81d5081 100644
a
|
b
|
class BaseDatabaseFeatures(object):
|
328 | 328 | |
329 | 329 | can_use_chunked_reads = True |
330 | 330 | can_return_id_from_insert = False |
| 331 | query_needed_to_fetch_return_id = False |
| 332 | |
331 | 333 | has_bulk_insert = False |
332 | 334 | uses_autocommit = False |
333 | 335 | uses_savepoints = False |
diff --git a/tests/regressiontests/model_formsets_regress/tests.py b/tests/regressiontests/model_formsets_regress/tests.py
index f1e935e..8b6c571 100644
a
|
b
|
|
1 | 1 | from __future__ import absolute_import |
2 | 2 | |
3 | 3 | from django import forms |
| 4 | from django.db import connection |
4 | 5 | from django.forms.formsets import BaseFormSet, DELETION_FIELD_NAME |
5 | 6 | from django.forms.util import ErrorDict, ErrorList |
6 | 7 | from django.forms.models import modelform_factory, inlineformset_factory, modelformset_factory, BaseModelFormSet |
… |
… |
class FormsetTests(TestCase):
|
255 | 256 | u'test-INITIAL_FORMS': u'0', |
256 | 257 | u'test-MAX_NUM_FORMS': u'', |
257 | 258 | u'test-0-name': u'Random Place', } |
258 | | with self.assertNumQueries(1): |
| 259 | expected_num_queries = 1 |
| 260 | if connection.features.query_needed_to_fetch_return_id: |
| 261 | expected_num_queries = 2 |
| 262 | with self.assertNumQueries(expected_num_queries): |
259 | 263 | formset = Formset(data, prefix="test") |
260 | 264 | formset.save() |
261 | 265 | |