From ad98b985aa18fbca65b45aae2421b985904bf561 Mon Sep 17 00:00:00 2001 From: Tim Graham <timograham@gmail.com> Date: Tue, 23 Jul 2013 15:20:53 -0400 Subject: [PATCH] Fixed test failures introduced in e716518ad29898fb25c820023aaf2fdd1c9eb4af refs #20761 --- django/db/models/query.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/django/db/models/query.py b/django/db/models/query.py index 9e0dd9202c..087c10de8e 100644 --- a/django/db/models/query.py +++ b/django/db/models/query.py @@ -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): """