-
Notifications
You must be signed in to change notification settings - Fork 137
Description
I am using django-nested-inline with a model defined like this:
Person
└─ House
└─Room
My Admin is defined in this way:
from nested_inline.admin import NestedStackedInline, NestedModelAdmin
class RoomInlineStacked(NestedStackedInline):
...
class HouseInline(NestedStackedInline):
inlines = [RoomInlineStacked]
class PersonAdmin(NestedModelAdmin):
inlines = [HouseInline]
The form displays correctly, and works fine, until there is an error in the RoomInlineStacked
. In which case, the error is only displayed within the inline formset, but not at the top level (where errors are normally shown)
Errors within HouseInline are reported correctly at the top of the page. I'm expecting this to happen for the RoomInlineStacked as well. aka I'm expecting to see this (which doesn't happen at the moment):
I am trying to understand what's missing within AdminErrorList
in https://github.com/s-block/django-nested-inline/blob/master/nested_inline/admin.py#L264 but I'm struggling to navigate the structure of formsets/forms/inlines and other attributes to find the error from the underlying NestedStackedInline
and send it back up to the NestedModelAdmin
.
Any pointers appreciated