mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
dialect/sql: do not call inner Scan for nil values in sql.NullScanner (#1771)
This commit is contained in:
@@ -160,5 +160,8 @@ type NullScanner struct {
|
||||
// Scan implements the Scanner interface.
|
||||
func (n *NullScanner) Scan(value interface{}) error {
|
||||
n.Valid = value != nil
|
||||
return n.S.Scan(value)
|
||||
if n.Valid {
|
||||
return n.S.Scan(value)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user