summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--system/db/content.go6
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