mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #25685 -- Fixed a duplicate query regression on deletion of proxied models.
Thanks to Trac alias ppetrid for the report and Tim for the review.
Conflicts:
django/db/models/deletion.py
tests/delete/tests.py
Forward port of 7c3ef19978 from stable/1.8.x
This commit is contained in:
@@ -99,6 +99,12 @@ class Avatar(models.Model):
|
||||
desc = models.TextField(null=True)
|
||||
|
||||
|
||||
# This model is used to test a duplicate query regression (#25685)
|
||||
class AvatarProxy(Avatar):
|
||||
class Meta:
|
||||
proxy = True
|
||||
|
||||
|
||||
class User(models.Model):
|
||||
avatar = models.ForeignKey(Avatar, models.CASCADE, null=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user