Ver Fonte

prevent duplicate roles from being sent

Alexander Belanger há 5 anos atrás
pai
commit
f68e568049
1 ficheiros alterados com 2 adições e 1 exclusões
  1. 2 1
      server/api/project_handler.go

+ 2 - 1
server/api/project_handler.go

@@ -126,7 +126,8 @@ func (app *App) HandleListProjectCollaborators(w http.ResponseWriter, r *http.Re
 	idArr := make([]uint, 0)
 
 	for _, role := range roles {
-		roleMap[role.UserID] = &role
+		roleCp := role
+		roleMap[role.UserID] = &roleCp
 		idArr = append(idArr, role.UserID)
 	}