mirror of
https://github.com/django/django.git
synced 2025-11-25 21:22:14 +00:00
Tested that get_or_create raises IntegrityError.
It used to raise "DatabaseError: no such savepoint" with the old transaction management. Closes #15117.
This commit is contained in:
parent
90fe9141de
commit
3a4276ffc3
2 changed files with 19 additions and 2 deletions
|
|
@ -24,3 +24,7 @@ class Person(models.Model):
|
|||
class ManualPrimaryKeyTest(models.Model):
|
||||
id = models.IntegerField(primary_key=True)
|
||||
data = models.CharField(max_length=100)
|
||||
|
||||
|
||||
class Profile(models.Model):
|
||||
person = models.ForeignKey(Person, primary_key=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue