mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-26 20:26:13 +01:00
Update robot account to skip NotFoundErr (#18321)
Fix #18320 Signed-off-by: Yang Jiao <jiaoya@vmware.com>
This commit is contained in:
parent
2c287cf27a
commit
fecee37439
@ -152,7 +152,7 @@ func (d *controller) Update(ctx context.Context, r *Robot, option *Option) error
|
||||
}
|
||||
// update the permission
|
||||
if option != nil && option.WithPermission {
|
||||
if err := d.rbacMgr.DeletePermissionsByRole(ctx, ROBOTTYPE, r.ID); err != nil {
|
||||
if err := d.rbacMgr.DeletePermissionsByRole(ctx, ROBOTTYPE, r.ID); err != nil && !errors.IsNotFoundErr(err) {
|
||||
return err
|
||||
}
|
||||
if err := d.createPermission(ctx, r); err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user