Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
fix: update project webhook types should not be empty (#6666)
h3n4lbcdfe5f1a2df
diff --git a/backend/api/v1/project_service.go b/backend/api/v1/project_service.goindex 1b34c6a58d..328a5c67b0 100644--- a/backend/api/v1/project_service.go+++ b/backend/api/v1/project_service.go@@ -776,6 +776,9 @@ func (s *ProjectService) UpdateWebhook(ctx context.Context, request *v1pb.Updateif err != nil {return nil, status.Errorf(codes.InvalidArgument, err.Error())}+ if len(types) == 0 {+ return nil, status.Errorf(codes.InvalidArgument, "notification types should not be empty")+ }update.ActivityList = typesdefault:return nil, status.Errorf(codes.InvalidArgument, "invalid field %q", path)diff --git a/frontend/src/components/ProjectWebhookForm.vue b/frontend/src/components/ProjectWebhookForm.vueindex bdcf4e13e5..aa47d505fd 100644--- a/frontend/src/components/ProjectWebhookForm.vue+++ b/frontend/src/components/ProjectWebhookForm.vue@@ -263,7 +263,9 @@v-elsetype="submit"class="btn-primary ml-3"- :disabled="!valueChanged"+ :disabled="+ !valueChanged || state.webhook.notificationTypes.length === 0+ "@click.prevent="updateWebhook">{{ $t("common.update") }}