incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject [06/17] git commit: [#6388] don't query for a post parent if its None
Date Thu, 02 Jan 2014 16:16:56 GMT
[#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/master
Commit: a7ab2f3c40a46abde24403b6896ca364b3b4925e
Parents: b97e47f
Author: Dave Brondsema <dbrondsema@slashdotmedia.com>
Authored: Thu Dec 19 17:44:13 2013 +0000
Committer: Tim Van Steenburgh <tvansteenburgh@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):


Mime
View raw message