mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user