Allow ModelAdmin.actions to be set to None. (#560)

`None` is an allowed value to disable all actions for a particular `ModelAdmin`.
This commit is contained in:
Simon Charette authored and GitHub committed 2021-01-31 10:24:32 +03:00
1 parent a1334a70b9
commit 8f9e77ce39
1 file changed
+1 -1
+1 -1
View File
@@ -154,7 +154,7 @@ class ModelAdmin(BaseModelAdmin[_ModelT]):
delete_selected_confirmation_template: str = ...
object_history_template: str = ...
popup_response_template: str = ...
actions: Sequence[Union[Callable[[ModelAdmin, HttpRequest, QuerySet], None], str]] = ...
actions: Optional[Sequence[Union[Callable[[ModelAdmin, HttpRequest, QuerySet], None], str]]] = ...
action_form: Any = ...
actions_on_top: bool = ...
actions_on_bottom: bool = ...