Skip to content

Commit

Permalink
Allow NoneType for ModelAdmin.actions (#198)
Browse files Browse the repository at this point in the history
This commit updates the `actions` attribute on the `ModelAdmin` class to allow NoneType. According the [Django
docs](https://docs.djangoproject.com/en/4.2/ref/contrib/admin/actions/#disabling-all-actions-for-a-particular-modeladmin) this option is used to disable all actions for a ModelAdmin page.
  • Loading branch information
rarredon authored Oct 5, 2023
1 parent 654ca82 commit 72e4deb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django-stubs/contrib/admin/options.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ class ModelAdmin(BaseModelAdmin[_ModelT]):
actions: Sequence[
Callable[[ModelAdmin[Any], HttpRequest, QuerySet[Any]], HttpResponse | None]
| str
] = ...
] | None = ...
action_form: Any = ...
actions_on_top: bool = ...
actions_on_bottom: bool = ...
Expand Down

0 comments on commit 72e4deb

Please sign in to comment.