mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-04 05:18:25 +00:00 
			
		
		
		
	don't reset team/repo count when updating team via API (#3831)
fixes #3600
This commit is contained in:
		
				
					committed by
					
						
						Lunny Xiao
					
				
			
			
				
	
			
			
			
						parent
						
							fc36567ee1
						
					
				
				
					commit
					e3028d124f
				
			@@ -123,13 +123,10 @@ func EditTeam(ctx *context.APIContext, form api.EditTeamOption) {
 | 
			
		||||
	// responses:
 | 
			
		||||
	//   "200":
 | 
			
		||||
	//     "$ref": "#/responses/Team"
 | 
			
		||||
	team := &models.Team{
 | 
			
		||||
		ID:          ctx.Org.Team.ID,
 | 
			
		||||
		OrgID:       ctx.Org.Team.OrgID,
 | 
			
		||||
		Name:        form.Name,
 | 
			
		||||
		Description: form.Description,
 | 
			
		||||
		Authorize:   models.ParseAccessMode(form.Permission),
 | 
			
		||||
	}
 | 
			
		||||
	team := ctx.Org.Team
 | 
			
		||||
	team.Name = form.Name
 | 
			
		||||
	team.Description = form.Description
 | 
			
		||||
	team.Authorize = models.ParseAccessMode(form.Permission)
 | 
			
		||||
	if err := models.UpdateTeam(team, true); err != nil {
 | 
			
		||||
		ctx.Error(500, "EditTeam", err)
 | 
			
		||||
		return
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user