Skip to content

Commit 64f5045

Browse files
tonyescaped
authored andcommitted
ModelAdminMixin: Only remove 'render_inline_actions' if exists
1 parent 959465a commit 64f5045

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

inline_actions/admin.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,8 @@ def get_fields(self, request, obj=None):
176176
# django adds all readonly fields by default
177177
# if `self.fields` is not defined we don't want to include
178178
# `render_inline_actions
179-
fields.remove('render_inline_actions')
179+
if 'render_inline_actions' in fields:
180+
fields.remove('render_inline_actions')
180181
return fields
181182

182183
def _execute_action(self, request, model_admin, action, obj, parent_obj=None):

0 commit comments

Comments
 (0)