From 9155480cddb7454bba99ae39ea4caac91261ca26 Mon Sep 17 00:00:00 2001 From: Michael Sun <55160142+MichaelSun48@users.noreply.github.com> Date: Mon, 26 Aug 2024 15:05:40 -0700 Subject: [PATCH] fix(custom-views): Allow view's query field to be empty (#76569) Views containing an empty query failed validation, and I can't think of a reason to disallow empty queries. --- src/sentry/api/serializers/rest_framework/groupsearchview.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sentry/api/serializers/rest_framework/groupsearchview.py b/src/sentry/api/serializers/rest_framework/groupsearchview.py index 78fe3ada4c0f9e..904a19fd584b59 100644 --- a/src/sentry/api/serializers/rest_framework/groupsearchview.py +++ b/src/sentry/api/serializers/rest_framework/groupsearchview.py @@ -20,7 +20,7 @@ class GroupSearchViewValidatorResponse(TypedDict): class ViewValidator(serializers.Serializer): id = serializers.CharField(required=False) name = serializers.CharField(required=True) - query = serializers.CharField(required=True) + query = serializers.CharField(required=True, allow_blank=True) querySort = serializers.ChoiceField( choices=SortOptions.as_choices(), default=SortOptions.DATE, required=False )