diff options
author | Florian Kaiser <florian.kaiser@fnkr.net> | 2016-01-31 19:16:40 +0000 |
---|---|---|
committer | Florian Kaiser <florian.kaiser@fnkr.net> | 2016-01-31 19:17:58 +0000 |
commit | 90780a0d90d19eb7e022603dfd2bf24148818d19 (patch) | |
tree | d2d2281427e1e62b78b76f1fd1b1f4fcca63248e | |
parent | fdad23444563cb4318b1715b4b1bc17d5354d01f (diff) | |
download | gitea-90780a0d90d19eb7e022603dfd2bf24148818d19.tar.gz gitea-90780a0d90d19eb7e022603dfd2bf24148818d19.zip |
Use invalid value (-1) instead of 0 to prevent bug if auto increment starts with 0
-rw-r--r-- | models/org.go | 2 |
1 files changed, 1 insertions, 1 deletions
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. |