Skip to content

Commit a41151c

Browse files
committed
Avoid panics. Safe conversions
1 parent 85c67e9 commit a41151c

File tree

2 files changed

+682
-100
lines changed

2 files changed

+682
-100
lines changed

sql/mysql_db/user.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ func (u *User) ToRow(ctx *sql.Context) sql.Row {
9090
for i, col := range userTblSchema {
9191
row[i], err = col.Default.Eval(ctx, nil)
9292
if err != nil {
93-
panic(err) // Should never happen, schema is static
93+
row[i] = nil
9494
}
9595
}
9696
//TODO: once the remaining fields are added, fill those in as well

0 commit comments

Comments
 (0)