Use proper existingProjectGrant

[ZITADOPER-1]
This commit is contained in:
Haim Kortovich
2024-05-20 18:15:08 -05:00
parent 9e7af107d1
commit 93944df40b

View File

@@ -368,7 +368,7 @@ func (wr *wrappedMachineUserReconciler) reconcileUserGrants(ctx context.Context,
var existingProjectGrant *project.GrantedProject
for _, existingGrantedProject := range grantedProjects.Result {
if existingGrantedProject.ProjectId == userGrantedProject.Status.ProjectId {
existingGrantedProject = existingGrantedProject
existingProjectGrant = existingGrantedProject
}
}
if existingProjectGrant == nil {