index
:
gogs.git
Gogs is a painless self-hosted Git service
log msg
author
committer
range
buildscript
main
mygogs
about
summary
refs
log
tree
commit
diff
path:
root
/
models
/
org.go
diff options
context:
1
2
3
4
5
6
7
8
9
10
15
20
25
30
35
40
space:
include
ignore
mode:
unified
ssdiff
stat only
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
/
models/org.go
parent
fdad23444563cb4318b1715b4b1bc17d5354d01f
(
diff
)
Use invalid value (-1) instead of 0 to prevent bug if auto increment starts with 0
Diffstat
(limited to 'models/org.go')
-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 8edb63bb..9254709a 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.