From c8f9286956a2d6abb7e7d7876e138999bae33d55 Mon Sep 17 00:00:00 2001 From: Sivaanand Murugesan Date: Wed, 13 Nov 2024 22:08:01 +0530 Subject: [PATCH] fix --- client/role.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/client/role.go b/client/role.go index 73f42267..a6c92814 100644 --- a/client/role.go +++ b/client/role.go @@ -57,10 +57,7 @@ func (h *V1Client) UpdateRole(role *models.V1Role, roleUID string) error { // ACL scoped to tenant only params := clientv1.NewV1RolesUIDUpdateParams().WithBody(role).WithUID(roleUID) _, err := h.Client.V1RolesUIDUpdate(params) - if err != nil { - return err - } - return nil + return err } // DeleteRole Delete existing role with ID @@ -68,8 +65,5 @@ func (h *V1Client) DeleteRole(roleUID string) error { // ACL scoped to tenant only params := clientv1.NewV1RolesUIDDeleteParams().WithUID(roleUID) _, err := h.Client.V1RolesUIDDelete(params) - if err != nil { - return err - } - return nil + return err }