diff --git a/core/services/job/models.go b/core/services/job/models.go index 292f5107147..900e2449e24 100644 --- a/core/services/job/models.go +++ b/core/services/job/models.go @@ -963,9 +963,13 @@ func (ofc OracleFactoryConfig) Value() (driver.Value, error) { // Scan reads the database value and returns an instance. func (ofc *OracleFactoryConfig) Scan(value interface{}) error { + if value == nil { + return nil // field is nullable + } + b, ok := value.([]byte) if !ok { - return errors.Errorf("expected bytes got %T", b) + return errors.Errorf("expected bytes got %T", value) } return json.Unmarshal(b, &ofc) }