Repository: wagtail/wagtail
File: wagtail/admin/viewsets/model.py (Python)

Code before:
                    f"reorder/<{conv}:pk>/",
                    self.reorder_view,
                    name="reorder",
                )
            )

        if self.inspect_view_enabled:
            urlpatterns.append(
                path(
                    f"inspect/<{conv}:pk>/",
                    self.inspect_view,
                    name="inspect",
                )
            )

        if self.copy_view_enabled:
            urlpatterns.append(path(f"copy/<{conv}:pk>/", self.copy_view, name="copy"))

        return urlpatterns

    def on_register(self):
        super().on_register()
        if self.url_converter not in get_converters():
            raise ImproperlyConfigured(
                f"{self.__class__.__name__} is using an unknown URL converter"
            )
        self.register_admin_url_finder()
        self.register_reference_index()
        self.register_permissions()


class ModelViewSetGroup(ViewSetGroup):
    """
    A container for grouping together multiple
    :class:`~wagtail.admin.viewsets.model.ModelViewSet` instances.

    All attributes and methods from
    :class:`~wagtail.admin.viewsets.base.ViewSetGroup` are available.
    """

    def get_app_label_from_subitems(self):
        for instance in self.registerables:
            if app_label := getattr(instance, "app_label", ""):
                return capfirst(app_label)
        return ""

    @cached_property
    def menu_label(self):
        return self.get_app_label_from_subitems()


Review comment (suggestion):
```suggestion
        if self.pk_path_converter not in get_converters():
            raise ImproperlyConfigured(
                f"{self.__class__.__name__}.pk_path_converter is not a "
                "registered path converter"
            )
```

Code after:

        if self.reorder_view_enabled:
            urlpatterns.append(
                path(f"reorder/<{conv}:pk>/", self.reorder_view, name="reorder")
            )

        if self.inspect_view_enabled:
            urlpatterns.append(
                path(f"inspect/<{conv}:pk>/", self.inspect_view, name="inspect")
            )

        if self.copy_view_enabled:
            urlpatterns.append(path(f"copy/<{conv}:pk>/", self.copy_view, name="copy"))

        return urlpatterns

    def on_register(self):
        super().on_register()
        if self.pk_path_converter not in get_converters():
            raise ImproperlyConfigured(
                f"{self.__class__.__name__}.pk_path_converter is not a "
                "registered path converter"
            )
        self.register_admin_url_finder()
        self.register_reference_index()
        self.register_permissions()


class ModelViewSetGroup(ViewSetGroup):
    """
    A container for grouping together multiple
    :class:`~wagtail.admin.viewsets.model.ModelViewSet` instances.

    All attributes and methods from
    :class:`~wagtail.admin.viewsets.base.ViewSetGroup` are available.
    """

    def get_app_label_from_subitems(self):
        for instance in self.registerables:
            if app_label := getattr(instance, "app_label", ""):
                return capfirst(app_label)
        return ""

    @cached_property
    def menu_label(self):
        return self.get_app_label_from_subitems()