-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Description
When updating a model with inlines via update_<model>, the min_num constraint defined on InlineModelAdmin is not enforced.
Current Behavior
The MCP allows having fewer inline objects than required by the min_num setting on the inline admin.
Expected Behavior
The min_num constraint should be validated when:
- Creating a parent object with inlines
- Updating inlines (especially when deleting)
If the minimum count is not met, return a validation error.
Django Admin Reference
class ChapterInline(admin.TabularInline):
model = Chapter
min_num = 1 # Require at least 1 chapterImplementation Notes
- Check
inline_admin.min_numafter processing inline operations - Consider remaining inline count after deletions
- Return descriptive error when minimum not met
Labels
enhancement
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels