Skip to content

Commit

Permalink
Revert get_children method
Browse files Browse the repository at this point in the history
  • Loading branch information
Kani999 committed Aug 13, 2024
1 parent 09f5b62 commit 32ef60f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion netbox_attachments/template_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,11 @@ def __init__(self, *args, **kwargs):
)

def get_children(self, request, parent):
super()
childrens = self.child_model.objects.filter(
object_type=ObjectType.objects.get_for_model(parent),
object_id=parent.id,
).restrict(request.user, "view")
return childrens

register_model_view(model, name=name, path=path)(View)

Expand Down
2 changes: 1 addition & 1 deletion netbox_attachments/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "5.1.2"
__version__ = "5.1.2-b2"

0 comments on commit 32ef60f

Please sign in to comment.