From 90780a0d90d19eb7e022603dfd2bf24148818d19 Mon Sep 17 00:00:00 2001 From: Florian Kaiser Date: Sun, 31 Jan 2016 19:16:40 +0000 Subject: [PATCH] Use invalid value (-1) instead of 0 to prevent bug if auto increment starts with 0 --- models/org.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/org.go b/models/org.go index 8edb63bbdc..9254709a26 100644 --- a/models/org.go +++ b/models/org.go @@ -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.