diff --git a/wagtail/api/v2/views.py b/wagtail/api/v2/views.py index d301c1632d..1fd46c398b 100644 --- a/wagtail/api/v2/views.py +++ b/wagtail/api/v2/views.py @@ -238,7 +238,7 @@ class BaseAPIViewSet(GenericViewSet): for field in cls.detail_only_fields: try: all_fields.remove(field) - except KeyError: + except ValueError: pass # Get list of configured fields