You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class Top(models.Model):
name = models.CharField(max_length=128)
class Middle(models.Model):
top = models.ForeignKey(Top)
name = models.CharField(max_length=128)
class Bottom(models.Model):
middle = models.ForeignKey(Middle)
name = models.CharField(max_length=128)
class BottomInline(NestedStackedInline):
extra = 0
model = Bottom
class MiddleInline(NestedStackedInline):
model = Middle
extra = 0
inlines = [BottomInline]
class TopAdmin(NestedModel):
model = Top
inlines = [MiddleInline]
Attempt to create a new Top object in django admin.
The Top model creation page has the name field and an empty group of Middle group with zero elements(expected)
But when you add a new Middle there is no Bottom group. (unexpected)
Only after saving one new Middle and re-editing the Top model again, Bottom Group will show (expected).
This does not happen with extra>0 in the BottomInline class
Django version 4.07
The text was updated successfully, but these errors were encountered:
Reproduction steps:
The
Top
model creation page has the name field and an empty group of Middle group with zero elements(expected)But when you add a new
Middle
there is noBottom
group. (unexpected)Only after saving one new
Middle
and re-editing theTop
model again,Bottom
Group will show (expected).This does not happen with extra>0 in the BottomInline class
Django version 4.07
The text was updated successfully, but these errors were encountered: