theatlantic / django-nested-admin

Django admin classes that allow for nested inlines
http://django-nested-admin.readthedocs.org/
Other
690 stars 97 forks source link

Weird behavior with `max_num` and nested inlines #230

Closed NeilujD closed 1 year ago

NeilujD commented 1 year ago

I am using django-nested-admin in order to recursively create relations with the same model (like a parent/child relationship). So I have three levels of nested inlines: Level1, Level2 and Level3

Level2 and Level3 have is not limited with the max_num option but Level1 is limited with 2 as its max_num's value. It means that I can have as many Level3 nested in a Level2 and Level2 in a Level1 as I want.

But when I reach the maximum number of Level1, all the links to add a nested objects are hidden, included the one permitting to add Level2 or Level3 objects. Thus even if I can add a second Level1, I can add nested objects in itself or even in other Level objects that were already existing.

I am using:

Could you help me on that please ? Did I miss something or is it an issue ?

fdintino commented 1 year ago

Oh, I see the bug here. I'll try to get a fix out this week, though it may not happen until next week. Thanks for the report!