diff options
author | Steve Manuel <nilslice@gmail.com> | 2016-10-30 22:47:50 -0700 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2016-10-30 22:47:50 -0700 |
commit | 3f5fefd80ace18f95ec80001cf71af5d2f426c15 (patch) | |
tree | 68bed8d87e00e276f8f4781f950aa5e800ee4dd2 | |
parent | 61444e3c7b145527a84a93665704762d70644f19 (diff) |
fixing _ specifier location
-rw-r--r-- | system/db/content.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/system/db/content.go b/system/db/content.go index 7e804d2..283851c 100644 --- a/system/db/content.go +++ b/system/db/content.go @@ -42,7 +42,7 @@ func update(ns, id string, data url.Values) (int, error) { if strings.Contains(ns, "_") { spec := strings.Split(ns, "_") ns = spec[0] - specifier = spec[1] + specifier = "_" + spec[1] } cid, err := strconv.Atoi(id) @@ -51,7 +51,7 @@ func update(ns, id string, data url.Values) (int, error) { } err = store.Update(func(tx *bolt.Tx) error { - b, err := tx.CreateBucketIfNotExists([]byte(ns + "_" + specifier)) + b, err := tx.CreateBucketIfNotExists([]byte(ns + specifier)) if err != nil { return err } @@ -85,11 +85,11 @@ func insert(ns string, data url.Values) (int, error) { if strings.Contains(ns, "_") { spec := strings.Split(ns, "_") ns = spec[0] - specifier = spec[1] + specifier = "_" + spec[1] } err := store.Update(func(tx *bolt.Tx) error { - b, err := tx.CreateBucketIfNotExists([]byte(ns + "_" + specifier)) + b, err := tx.CreateBucketIfNotExists([]byte(ns + specifier)) if err != nil { return err } |