Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird behavior with max_num and nested inlines #230

Closed
NeilujD opened this issue Nov 2, 2022 · 1 comment
Closed

Weird behavior with max_num and nested inlines #230

NeilujD opened this issue Nov 2, 2022 · 1 comment

Comments

@NeilujD
Copy link

NeilujD commented Nov 2, 2022

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.

  • Image 1 is before reaching the maximum number
    Image 1

  • Image 2 is when the maximum number is reached
    Image 2

I am using:

  • Django 3.2.15
  • django-nested-admin 3.4

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

@fdintino
Copy link
Member

fdintino commented Nov 2, 2022

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants