0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-09-26 09:34:05 -04:00

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
This commit is contained in:
Lunny Xiao
2019-06-23 23:22:43 +08:00
committed by Lauris BH
parent baefea311f
commit aa7c34cf86
156 changed files with 1854 additions and 1833 deletions

View File

@@ -11,7 +11,7 @@ import (
"reflect"
"strconv"
"github.com/go-xorm/core"
"xorm.io/core"
)
// Get retrieve one record from database, bean's non-empty fields
@@ -24,6 +24,10 @@ func (session *Session) Get(bean interface{}) (bool, error) {
}
func (session *Session) get(bean interface{}) (bool, error) {
if session.statement.lastError != nil {
return false, session.statement.lastError
}
beanValue := reflect.ValueOf(bean)
if beanValue.Kind() != reflect.Ptr {
return false, errors.New("needs a pointer to a value")