From 712e105e69752d81e82535d0503915f88d29ad67 Mon Sep 17 00:00:00 2001 From: Peter Kieltyka <peter.kieltyka@pressly.com> Date: Thu, 14 May 2015 09:27:07 -0400 Subject: [PATCH] Fix StringArray scanner --- util/sqlutil/scanner.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/util/sqlutil/scanner.go b/util/sqlutil/scanner.go index 7d08bee6..91dd01c4 100644 --- a/util/sqlutil/scanner.go +++ b/util/sqlutil/scanner.go @@ -84,6 +84,9 @@ func (a *StringArray) Scan(src interface{}) error { return errors.New("Scan source was not []bytes") } s := string(b)[1 : len(b)-1] + if s == "" { + return nil + } results := strings.Split(s, ",") *a = StringArray(results) return nil -- GitLab