mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-04 06:38:16 -06:00
Return child_model instead of model for use in bulk_edit_button
This commit is contained in:
parent
485d3aee37
commit
c5966be13b
@ -129,7 +129,6 @@ class ObjectChildrenView(ObjectView, ActionsMixin, TableMixin):
|
||||
GET handler for rendering child objects.
|
||||
"""
|
||||
instance = self.get_object(**kwargs)
|
||||
model = self.queryset.model
|
||||
child_objects = self.get_children(request, instance)
|
||||
|
||||
if self.filterset:
|
||||
@ -147,12 +146,12 @@ class ObjectChildrenView(ObjectView, ActionsMixin, TableMixin):
|
||||
return render(request, 'htmx/table.html', {
|
||||
'object': instance,
|
||||
'table': table,
|
||||
'model': model,
|
||||
'model': self.child_model,
|
||||
})
|
||||
|
||||
return render(request, self.get_template_name(), {
|
||||
'object': instance,
|
||||
'model': model,
|
||||
'model': self.child_model,
|
||||
'child_model': self.child_model,
|
||||
'base_template': f'{instance._meta.app_label}/{instance._meta.model_name}.html',
|
||||
'table': table,
|
||||
|
Loading…
Reference in New Issue
Block a user