Browse Source

#2700 fix sqlite3 can't create issue with more than one label

for-closed-social
Unknwon 8 years ago
parent
commit
ea80274229
8 changed files with 16 additions and 19 deletions
  1. +2
    -2
      .bra.toml
  2. +1
    -1
      README.md
  3. +1
    -1
      conf/app.ini
  4. +1
    -1
      gogs.go
  5. +7
    -10
      models/issue.go
  6. +1
    -1
      models/repo.go
  7. +2
    -2
      modules/bindata/bindata.go
  8. +1
    -1
      templates/.VERSION

+ 2
- 2
.bra.toml View File

@ -1,7 +1,7 @@
[run] [run]
init_cmds = [ init_cmds = [
#["grep", "-rn", "FIXME", "."], #["grep", "-rn", "FIXME", "."],
["make", "build-dev"],
["make", "build-dev", "TAGS=sqlite"],
["./gogs", "web"] ["./gogs", "web"]
] ]
watch_all = true watch_all = true
@ -15,6 +15,6 @@ watch_exts = [".go"]
ignore_files = [".+_test.go"] ignore_files = [".+_test.go"]
build_delay = 1500 build_delay = 1500
cmds = [ cmds = [
["make", "build-dev"], # sqlite cert pam tidb
["make", "build-dev", "TAGS=sqlite"], # cert pam tidb
["./gogs", "web"] ["./gogs", "web"]
] ]

+ 1
- 1
README.md View File

@ -3,7 +3,7 @@ Gogs - Go Git Service [![Build Status](https://travis-ci.org/gogits/gogs.svg?bra
![](https://github.com/gogits/gogs/blob/master/public/img/gogs-large-resize.png?raw=true) ![](https://github.com/gogits/gogs/blob/master/public/img/gogs-large-resize.png?raw=true)
##### Current version: 0.8.47
##### Current version: 0.8.48
| Web | UI | Preview | | Web | UI | Preview |
|:-------------:|:-------:|:-------:| |:-------------:|:-------:|:-------:|

+ 1
- 1
conf/app.ini View File

@ -74,7 +74,7 @@ SSH_ROOT_PATH =
; Directory to create temporary files when test publick key using ssh-keygen, ; Directory to create temporary files when test publick key using ssh-keygen,
; default is system temporary directory. ; default is system temporary directory.
SSH_KEY_TEST_PATH = SSH_KEY_TEST_PATH =
; Path to ssh-keygen, default is 'ssh-keygen' and let shells find out which one to call.
; Path to ssh-keygen, default is 'ssh-keygen' and let shell find out which one to call.
SSH_KEYGEN_PATH = ssh-keygen SSH_KEYGEN_PATH = ssh-keygen
; Indicate whether to check minimum key size with corresponding type ; Indicate whether to check minimum key size with corresponding type
MINIMUM_KEY_SIZE_CHECK = false MINIMUM_KEY_SIZE_CHECK = false

+ 1
- 1
gogs.go View File

@ -17,7 +17,7 @@ import (
"github.com/gogits/gogs/modules/setting" "github.com/gogits/gogs/modules/setting"
) )
const APP_VER = "0.8.47.0227"
const APP_VER = "0.8.48.0229"
func init() { func init() {
runtime.GOMAXPROCS(runtime.NumCPU()) runtime.GOMAXPROCS(runtime.NumCPU())

+ 7
- 10
models/issue.go View File

@ -297,20 +297,17 @@ func newIssue(e *xorm.Session, repo *Repository, issue *Issue, labelIDs []int64,
return err return err
} }
var label *Label
for _, id := range labelIDs {
if id == 0 {
continue
}
// During the session, SQLite3 dirver cannot handle retrieve objects after update something.
// So we have to get all needed labels first.
labels := make([]*Label, 0, len(labelIDs))
if err = e.In("id", labelIDs).Find(&labels); err != nil {
return fmt.Errorf("Find all labels: %v", err)
}
label, err = getLabelByID(e, id)
if err != nil {
return err
}
for _, label := range labels {
if err = issue.addLabel(e, label); err != nil { if err = issue.addLabel(e, label); err != nil {
return fmt.Errorf("addLabel: %v", err) return fmt.Errorf("addLabel: %v", err)
} }
} }
if issue.MilestoneID > 0 { if issue.MilestoneID > 0 {

+ 1
- 1
models/repo.go View File

@ -27,7 +27,7 @@ import (
"github.com/mcuadros/go-version" "github.com/mcuadros/go-version"
"gopkg.in/ini.v1" "gopkg.in/ini.v1"
"github.com/gogits/git-module"
git "github.com/gogits/git-module"
api "github.com/gogits/go-gogs-client" api "github.com/gogits/go-gogs-client"
"github.com/gogits/gogs/modules/bindata" "github.com/gogits/gogs/modules/bindata"

+ 2
- 2
modules/bindata/bindata.go
File diff suppressed because it is too large
View File


+ 1
- 1
templates/.VERSION View File

@ -1 +1 @@
0.8.47.0227
0.8.48.0229

Loading…
Cancel
Save