Changes to allow to work with Django 1.2 (don't use 'with transaction:')

svn: r19830
This commit is contained in:
Doug Blank 2012-06-12 01:40:13 +00:00
parent ca26e2aec7
commit 1f8f4c6b5c

View File

@ -174,13 +174,13 @@ class DbDjango(DbWriteBase, DbReadBase):
self.use_import_cache = True
self.import_cache = {}
@transaction.commit_on_success
def commit_import(self):
"""
Commits the items that were queued up during the last gedcom
import for two step adding.
"""
# First we add the primary objects:
with transaction.commit_on_success():
for key in self.import_cache.keys():
obj = self.import_cache[key]
if isinstance(obj, gen.lib.Person):