Browse Source

chore: fix miss makezero bug (#7752)

alingse 4 months ago
parent
commit
87f47166ac
1 changed files with 1 additions and 1 deletions
  1. 1 1
      internal/database/org.go

+ 1 - 1
internal/database/org.go

@@ -412,7 +412,7 @@ func RemoveOrgUser(orgID, userID int64) error {
 	}
 
 	// Delete all repository accesses and unwatch them.
-	repoIDs := make([]int64, len(repos))
+	repoIDs := make([]int64, 0, len(repos))
 	for i := range repos {
 		repoIDs = append(repoIDs, repos[i].ID)
 		if err = watchRepo(sess, user.ID, repos[i].ID, false); err != nil {