Skip to content

Commit 4c9adfa

Browse files
authored
Fix signature of LogEntryManager.log_actions
`LogEntryManager.log_actions` can take any `Iterable[T]` for the `queryset` param, not necessarily a `QuerySet[T]`. Indeed, Django itself invokes it with a `list[T]` in `ModelAdmin.log_addition`: https://github.com/django/django/blob/091f66e51aa900f7d7650529621bdc8e4b0dee68/django/contrib/admin/options.py#L945
1 parent 25da96c commit 4c9adfa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

django-stubs/contrib/admin/models.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class LogEntryManager(models.Manager[LogEntry]):
2525
def log_actions(
2626
self,
2727
user_id: int | str | UUID,
28-
queryset: QuerySet[Model],
28+
queryset: Iterable[Model],
2929
action_flag: int,
3030
change_message: str | list[Any] = "",
3131
*,

0 commit comments

Comments
 (0)