mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-09 11:21:19 +01:00
#2349 fix convert type
This commit is contained in:
parent
db719abff2
commit
c199703e2a
1 changed files with 3 additions and 3 deletions
|
@ -109,9 +109,9 @@ type LoginSource struct {
|
|||
// and handles possible irregular cases.
|
||||
func Cell2Int64(val xorm.Cell) int64 {
|
||||
switch (*val).(type) {
|
||||
case []int8:
|
||||
log.Trace("Cell2Int64 ([]int8): %v", *val)
|
||||
return int64((*val).([]int8)[0])
|
||||
case []uint8:
|
||||
log.Trace("Cell2Int64 ([]uint8): %v", *val)
|
||||
return com.StrTo(string((*val).([]uint8))).MustInt64()
|
||||
}
|
||||
return (*val).(int64)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue