Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed test failures introduced in e716518

refs #20761
  • Loading branch information...
commit ad98b985aa18fbca65b45aae2421b985904bf561 1 parent fb052b5
@timgraham timgraham authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  django/db/models/query.py
View
3  django/db/models/query.py
@@ -420,12 +420,13 @@ def _create_object_from_params(self, lookup, params):
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):
"""
Please sign in to comment.
Something went wrong with that request. Please try again.