mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Reduce usage of allcols on update (#2596)
* reduce usage of allcols on update * fix bug and tests
This commit is contained in:
		@@ -1458,7 +1458,7 @@ func TransferOwnership(doer *User, newOwnerName string, repo *Repository) error
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			t.NumRepos--
 | 
			
		||||
			if _, err := sess.Id(t.ID).AllCols().Update(t); err != nil {
 | 
			
		||||
			if _, err := sess.Id(t.ID).Cols("num_repos").Update(t); err != nil {
 | 
			
		||||
				return fmt.Errorf("decrease team repository count '%d': %v", t.ID, err)
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user