Skip to content

Commit

Permalink
Don't exclude inline if has view permission
Browse files Browse the repository at this point in the history
Currently, inlines with view permission are silently excluded by NestedModelAdmin where they would not be excluded by django.contrib.admin.ModelAdmin. This PR fixes that.
  • Loading branch information
scottgigante authored Nov 22, 2023
1 parent 0671b6b commit 6fb1926
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions nested_inline/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def get_inline_instances(self, request, obj=None):
else:
if not (inline.has_add_permission(request, obj) or
inline.has_change_permission(request, obj) or
inline.has_view_permission(request, obj) or
inline.has_delete_permission(request, obj)):
continue
if not inline.has_add_permission(request, obj):
Expand Down

0 comments on commit 6fb1926

Please sign in to comment.