1
0
mirror of https://github.com/django/django.git synced 2025-10-25 06:36:07 +00:00

Fixed #33111 -- Fixed passing object to ModelAdmin.get_inlines() when editing in admin change view.

ModelAdmin.get_inlines() should get an unmutated object when creating
formsets during POST request.
This commit is contained in:
Hasan Ramezani
2021-09-16 10:34:10 +02:00
committed by Mariusz Felisiak
parent 1bb8200f2f
commit 2f0f30f973
4 changed files with 43 additions and 5 deletions

View File

@@ -327,6 +327,12 @@ class CourseProxy2(Course):
# Other models
class ShowInlineParent(models.Model):
show_inlines = models.BooleanField(default=False)
class ShowInlineChild(models.Model):
parent = models.ForeignKey(ShowInlineParent, on_delete=models.CASCADE)
class ProfileCollection(models.Model):