You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by jo...@apache.org on 2014/01/06 16:18:04 UTC

[14/50] git commit: [#6388] don't query for a post parent if its None

[#6388] don't query for a post parent if its None


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/a7ab2f3c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/a7ab2f3c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/a7ab2f3c

Branch: refs/heads/cj/6992
Commit: a7ab2f3c40a46abde24403b6896ca364b3b4925e
Parents: b97e47f
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Thu Dec 19 17:44:13 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Jan 2 16:16:20 2014 +0000

----------------------------------------------------------------------
 Allura/allura/model/discuss.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/a7ab2f3c/Allura/allura/model/discuss.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/discuss.py b/Allura/allura/model/discuss.py
index 1059295..efa7b35 100644
--- a/Allura/allura/model/discuss.py
+++ b/Allura/allura/model/discuss.py
@@ -531,7 +531,8 @@ class Post(Message, VersionedArtifact, ActivityObject):
 
     @property
     def parent(self):
-        return self.query.get(_id=self.parent_id)
+        if self.parent_id:
+            return self.query.get(_id=self.parent_id)
 
     @property
     def subject(self):