From 86af1b2af51d908b1366415a9f60504a03a3b0ec Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Mon, 6 May 2013 15:35:01 -0400 Subject: [PATCH] topic creation now checks for valid pid as well --- src/topics.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/topics.js b/src/topics.js index 310cbe2448..f58d8632dd 100644 --- a/src/topics.js +++ b/src/topics.js @@ -149,7 +149,7 @@ var RDB = require('./redis.js'), // Posts posts.create(uid, tid, content, function(pid) { - RDB.lpush('tid:' + tid + ':posts', pid); + if (pid > 0) RDB.lpush('tid:' + tid + ':posts', pid); });