From 505e43d0d8e9721031c7e735e1531cc10e7ccc59 Mon Sep 17 00:00:00 2001 From: krehermann <16602512+krehermann@users.noreply.github.com> Date: Fri, 18 Oct 2024 13:12:37 -0600 Subject: [PATCH] fix broken code that prevent jobs from loading in ui (#14849) --- core/services/job/models.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) }