rabbagliettiandrea / dj-nested-inlines

Adds nested inline support in Django admin
38 stars 34 forks source link

Not working when extras = 0 #20

Open cdvv7788 opened 9 years ago

cdvv7788 commented 9 years ago

When i have something like:

class AInline(NestedStackedInline): model = Column extra = 0 fields = ("content",)

class BInline(NestedStackedInline): model = Row extra = 0 inlines = [ AInline, ]

reversion.VersionAdmin,

class PageAdmin( NestedModelAdmin): inlines = [ BInline, ]

It won't show anything for the B model when i click "Add another B". For the A model it is working properly. The only way i could find to get a correct B inline was to use a non zero extra, but that keeps the error once i try to add more manually from the admin. I think it happens when you try to "Add another" that has an inline field

cdvv7788 commented 9 years ago

The issue seems to be in stacked inline. Tested in Tabular inline and it is working as intended (mostly)

cdvv7788 commented 9 years ago

Stacked in update seems to be working. Issue is on add parent form

cdvv7788 commented 9 years ago

"Add new A" is adding all A's inside first nest