From e834d960b90499691f1a4679e2e6896aeb0e9ffa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9a=20Grondier?= Date: Mon, 2 Dec 2024 10:52:58 +0100 Subject: [PATCH] Fix npd --- cmd/dbaas_user_show_redis.go | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/cmd/dbaas_user_show_redis.go b/cmd/dbaas_user_show_redis.go index 28c51832..5feb9f67 100644 --- a/cmd/dbaas_user_show_redis.go +++ b/cmd/dbaas_user_show_redis.go @@ -49,14 +49,19 @@ func (c *dbaasUserShowCmd) showRedis(ctx context.Context) (output.Outputter, err for _, u := range s.Users { if u.Username == c.Username { - return &dbaasUserShowOutput{ + o := &dbaasUserShowOutput{ Username: c.Username, Password: u.Password, Type: u.Type, - Redis: &dbaasRedisUserShowOutput{ + } + + if u.AccessControl != nil { + o.Redis = &dbaasRedisUserShowOutput{ AccessControl: *u.AccessControl, - }, - }, nil + } + } + + return o, nil } }