mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Use session for retrieving org teams (#11438)
Co-authored-by: Guillermo Prandi <guillep2k@users.noreply.github.com>
This commit is contained in:
		@@ -1241,7 +1241,7 @@ func TransferOwnership(doer *User, newOwnerName string, repo *Repository) error
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if newOwner.IsOrganization() {
 | 
			
		||||
		if err := newOwner.GetTeams(&SearchTeamOptions{}); err != nil {
 | 
			
		||||
		if err := newOwner.getTeams(sess); err != nil {
 | 
			
		||||
			return fmt.Errorf("GetTeams: %v", err)
 | 
			
		||||
		}
 | 
			
		||||
		for _, t := range newOwner.Teams {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user