Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: missing creator (#6180)

ecmadao7865496ec7e2
diff --git a/backend/api/v1/setting_service.go b/backend/api/v1/setting_service.go
index f9e5e99ae2..73f6166ee1 100644
--- a/backend/api/v1/setting_service.go
+++ b/backend/api/v1/setting_service.go
@@ -440,7 +440,9 @@ func (s *SettingService) convertToSettingMessage(ctx context.Context, setting *s
if err != nil {
return nil, status.Errorf(codes.Internal, fmt.Sprintf("failed to get creator: %v", err))
}
- template.Creator = fmt.Sprintf("%s%s", userNamePrefix, creator.Email)
+ if creator != nil {
+ template.Creator = fmt.Sprintf("%s%s", userNamePrefix, creator.Email)
+ }
v1Value.Rules = append(v1Value.Rules, &v1pb.WorkspaceApprovalSetting_Rule{
Expression: rule.Expression,
Template: template,