diff options
author | Steve Manuel <nilslice@gmail.com> | 2016-10-30 23:07:12 -0700 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2016-10-30 23:07:12 -0700 |
commit | 3016c1e6b38ea845b15571c36257c3137d334d07 (patch) | |
tree | bf2d724d64ae93a96a311bc5997894031f8c15d2 /system/db/content.go | |
parent | 4442aa7afbb15f7c52942f4461eaa5a9c78b5718 (diff) |
dont allow non main content types to be sorted
Diffstat (limited to 'system/db/content.go')
-rw-r--r-- | system/db/content.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/system/db/content.go b/system/db/content.go index 1d4c59e..bd1ee4b 100644 --- a/system/db/content.go +++ b/system/db/content.go @@ -140,7 +140,6 @@ func DeleteContent(target string) error { tx.Bucket([]byte(ns)).Delete([]byte(id)) return nil }) - if err != nil { return err } @@ -207,6 +206,11 @@ func ContentAll(namespace string) [][]byte { // in descending order, from most recent to least recent // Should be called from a goroutine after SetContent is successful func SortContent(namespace string) { + // only sort main content types i.e. Post + if strings.Contains(namespace, "_") { + return + } + all := ContentAll(namespace) var posts sortablePosts |