diff --git a/domain/common.go b/domain/common.go index 62bd34f..9757cd2 100644 --- a/domain/common.go +++ b/domain/common.go @@ -16,6 +16,10 @@ func (j JSONB) Value() (driver.Value, error) { // Scan implements the sql.Scanner interface func (j *JSONB) Scan(value any) error { + if value == nil { + *j = nil + return nil + } return json.Unmarshal([]byte(value.(string)), j) }