mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Fix some slice problems (incorrect slice length) (#19592)
This commit is contained in:
		@@ -245,7 +245,7 @@ func deleteOAuth2Application(sess db.Engine, id, userid int64) error {
 | 
			
		||||
		"oauth2_authorization_code.grant_id = oauth2_grant.id AND oauth2_grant.application_id = ?", id).Find(&codes); err != nil {
 | 
			
		||||
		return err
 | 
			
		||||
	}
 | 
			
		||||
	codeIDs := make([]int64, 0)
 | 
			
		||||
	codeIDs := make([]int64, 0, len(codes))
 | 
			
		||||
	for _, grant := range codes {
 | 
			
		||||
		codeIDs = append(codeIDs, grant.ID)
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user