diff --git a/wagtail/snippets/models.py b/wagtail/snippets/models.py index 866d7ac714..c987337398 100644 --- a/wagtail/snippets/models.py +++ b/wagtail/snippets/models.py @@ -52,8 +52,8 @@ def register_snippet(model, viewset=None): model.get_admin_url_namespace = get_admin_url_namespace if viewset is None: - viewset = getattr(model, "admin_viewset", SnippetViewSet) - if isinstance(viewset, str): + viewset = SnippetViewSet + elif isinstance(viewset, str): viewset = import_string(viewset) admin_viewset = viewset(