Skip to content

Commit

Permalink
better decimal reassign
Browse files Browse the repository at this point in the history
  • Loading branch information
serprex committed May 8, 2024
1 parent 207dd6c commit fae7d55
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions flow/pua/peerdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,11 +235,7 @@ func LuaRowNewIndex(ls *lua.LState) int {
case qvalue.QValueKindTimeTZ:
newqv = qvalue.QValueTimeTZ{Val: LVAsTime(ls, val)}
case qvalue.QValueKindNumeric:
if ud, ok := val.(*lua.LUserData); ok {
if num, ok := ud.Value.(decimal.Decimal); ok {
newqv = qvalue.QValueNumeric{Val: num}
}
}
newqv = qvalue.QValueNumeric{Val: LVAsDecimal(ls, val)}
case qvalue.QValueKindBytes:
newqv = qvalue.QValueBytes{Val: []byte(lua.LVAsString(val))}
case qvalue.QValueKindUUID:
Expand Down

0 comments on commit fae7d55

Please sign in to comment.