summaryrefslogtreecommitdiff
path: root/system/db/config.go
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2017-01-13 14:28:36 -0800
committerSteve Manuel <nilslice@gmail.com>2017-01-13 14:28:36 -0800
commit1e745959284c7e23280ccba63ca9ae1fcf983f90 (patch)
tree62b01da982b96c2e397ddaec4b34ad756f45f892 /system/db/config.go
parent2669a35c077e694f7200065f7f71c795327ce428 (diff)
adding stop for PutConfig if there is no config data
Diffstat (limited to 'system/db/config.go')
-rw-r--r--system/db/config.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/system/db/config.go b/system/db/config.go
index 1ba71c8..e023729 100644
--- a/system/db/config.go
+++ b/system/db/config.go
@@ -134,6 +134,10 @@ func PutConfig(key string, value interface{}) error {
return err
}
+ if c == nil {
+ return nil
+ }
+
err = json.Unmarshal(c, &kv)
if err != nil {
return err