diff --git a/django-stubs/contrib/admin/options.pyi b/django-stubs/contrib/admin/options.pyi index 892b91cb..3a5ca8ab 100644 --- a/django-stubs/contrib/admin/options.pyi +++ b/django-stubs/contrib/admin/options.pyi @@ -139,7 +139,7 @@ class BaseModelAdmin(Generic[_ModelT]): def has_view_or_change_permission(self, request: HttpRequest, obj: _ModelT | None = ...) -> bool: ... def has_module_permission(self, request: HttpRequest) -> bool: ... @property - def view_on_site(self) -> Callable[[_ModelT], str] | bool: ... + def view_on_site(self) -> Callable[[_ModelT], str | None] | bool: ... _ModelAdmin = TypeVar("_ModelAdmin", bound=ModelAdmin[Any]) _ActionCallable: TypeAlias = Callable[[_ModelAdmin, HttpRequest, QuerySet[_ModelT]], HttpResponseBase | None]