diff options
| author | Jacob Walls <jacobtylerwalls@gmail.com> | 2022-01-01 11:56:10 -0500 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-01-11 12:22:49 +0100 |
| commit | dc9deea8e85641695e489e43ed5d5638134c15c7 (patch) | |
| tree | 887f578388c6a2627cc755e8de868ec498c6dc79 /django | |
| parent | b111b15c12bb89c49006ea13d20435d2022db23a (diff) | |
Fixed #11715 -- Changed default value of ModelAdmin.actions/inlines to empty tuples.
This clarifies the intended pattern of overwriting the default value
rather than mutating it.
Diffstat (limited to 'django')
| -rw-r--r-- | django/contrib/admin/options.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py index 100e481229..12cd0948ca 100644 --- a/django/contrib/admin/options.py +++ b/django/contrib/admin/options.py @@ -565,7 +565,7 @@ class ModelAdmin(BaseModelAdmin): save_on_top = False paginator = Paginator preserve_filters = True - inlines = [] + inlines = () # Custom templates (designed to be over-ridden in subclasses) add_form_template = None @@ -577,7 +577,7 @@ class ModelAdmin(BaseModelAdmin): popup_response_template = None # Actions - actions = [] + actions = () action_form = helpers.ActionForm actions_on_top = True actions_on_bottom = False |
