mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-04 09:44:21 +00:00 
			
		
		
		
	Use invalid value (-1) instead of 0 to prevent bug if auto increment starts with 0
This commit is contained in:
		@@ -1046,7 +1046,7 @@ func (org *User) getUserRepositories(userID int64) (err error) {
 | 
			
		||||
	}
 | 
			
		||||
	if len(teamIDs) == 0 {
 | 
			
		||||
		// user has no team but "IN ()" is invalid SQL
 | 
			
		||||
		teamIDs = append(teamIDs, "0")  // there is no repo with id=0
 | 
			
		||||
		teamIDs = append(teamIDs, "-1")  // there is no repo with id=-1
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// Due to a bug in xorm using IN() together with OR() is impossible.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user