Merge pull request #1886 from flipped-aurora/revert-1884-main

Revert "Update basetypes.go, fixed origin_setting column read error"
This commit is contained in:
PiexlMax(奇淼
2024-09-18 22:41:24 +08:00
committed by GitHub

View File

@@ -23,11 +23,11 @@ func (m *JSONMap) Scan(value interface{}) error {
*m = make(map[string]interface{})
return nil
}
text, ok := value.(string)
bytes, ok := value.([]byte)
if !ok {
return errors.New("Scan source was not text")
return errors.New("Scan source was not []bytes")
}
err := json.Unmarshal([]byte(text), m)
err := json.Unmarshal(bytes, m)
if err != nil {
return err
}