0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-29 17:36:49 +01:00

Remove the ability to set snippets viewset via admin_viewset attribute on the model

This commit is contained in:
Sage Abdullah 2022-09-16 15:33:09 +01:00 committed by Matt Westcott
parent a7249a851f
commit f3b8a7df27

View File

@ -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(