mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	Backport #13118 If team does not exist expect ErrTeamNotExist not ErrUserNotEXist Fix #11336 Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
		@@ -397,7 +397,7 @@ func orgAssignment(args ...bool) macaron.Handler {
 | 
			
		||||
		if assignTeam {
 | 
			
		||||
			ctx.Org.Team, err = models.GetTeamByID(ctx.ParamsInt64(":teamid"))
 | 
			
		||||
			if err != nil {
 | 
			
		||||
				if models.IsErrUserNotExist(err) {
 | 
			
		||||
				if models.IsErrTeamNotExist(err) {
 | 
			
		||||
					ctx.NotFound()
 | 
			
		||||
				} else {
 | 
			
		||||
					ctx.Error(http.StatusInternalServerError, "GetTeamById", err)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user