Fixed test failures introduced in e716518ad2

refs #20761
This commit is contained in:
Tim Graham 2013-07-23 15:20:53 -04:00
parent fb052b528a
commit ad98b985aa
1 changed files with 2 additions and 1 deletions

View File

@ -420,12 +420,13 @@ class QuerySet(object):
return obj, True
except DatabaseError as e:
transaction.savepoint_rollback(sid, using=self.db)
exc_info = sys.exc_info()
if isinstance(e, IntegrityError):
try:
return self.get(**lookup), False
except self.model.DoesNotExist:
pass
six.reraise(*sys.exc_info())
six.reraise(*exc_info)
def _extract_model_params(self, defaults, **kwargs):
"""