Browse Source

#2349 fix convert type

pull/2379/merge
Unknwon 9 years ago
parent
commit
c199703e2a
  1. 6
      models/login.go

6
models/login.go

@ -109,9 +109,9 @@ type LoginSource struct {
// and handles possible irregular cases. // and handles possible irregular cases.
func Cell2Int64(val xorm.Cell) int64 { func Cell2Int64(val xorm.Cell) int64 {
switch (*val).(type) { switch (*val).(type) {
case []int8: case []uint8:
log.Trace("Cell2Int64 ([]int8): %v", *val) log.Trace("Cell2Int64 ([]uint8): %v", *val)
return int64((*val).([]int8)[0]) return com.StrTo(string((*val).([]uint8))).MustInt64()
} }
return (*val).(int64) return (*val).(int64)
} }

Loading…
Cancel
Save