diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2019-06-23 23:22:43 +0800 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2019-06-23 18:22:43 +0300 |
commit | aa7c34cf86081b71f796f6e5da60e62a3cda43ce (patch) | |
tree | c9e4b4f1490b43e942fa71b37748072d3fe441e8 /models/issue.go | |
parent | baefea311f1a66a97f9a2779ad3342f4f8167d28 (diff) | |
download | gitea-aa7c34cf86081b71f796f6e5da60e62a3cda43ce.tar.gz gitea-aa7c34cf86081b71f796f6e5da60e62a3cda43ce.zip |
Fix error log when loading issues caused by a xorm bug (#7271)
* fix error log when loading issues caused by a xorm bug
* upgrade packages
* fix fmt
* fix Consistency
* fix tests
Diffstat (limited to 'models/issue.go')
-rw-r--r-- | models/issue.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/models/issue.go b/models/issue.go index 27298b8a86..b5504beb71 100644 --- a/models/issue.go +++ b/models/issue.go @@ -19,8 +19,8 @@ import ( "code.gitea.io/gitea/modules/util" "github.com/Unknwon/com" - "github.com/go-xorm/builder" "github.com/go-xorm/xorm" + "xorm.io/builder" ) // Issue represents an issue or pull request of repository. @@ -1428,6 +1428,7 @@ func Issues(opts *IssuesOptions) ([]*Issue, error) { if err := sess.Find(&issues); err != nil { return nil, fmt.Errorf("Find: %v", err) } + sess.Close() if err := IssueList(issues).LoadAttributes(); err != nil { return nil, fmt.Errorf("LoadAttributes: %v", err) |