allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hei...@apache.org
Subject allura git commit: On moderation page, if artifact can't be loaded, don't error out but be graceful and put some debugging in
Date Wed, 23 Mar 2016 19:31:30 GMT
Repository: allura
Updated Branches:
  refs/heads/master 85a53446a -> 8637eb74e


On moderation page, if artifact can't be loaded, don't error out but be graceful and put some
debugging in


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

Branch: refs/heads/master
Commit: 8637eb74e1a7748d2d6e4064f94bb840eabadf05
Parents: 85a5344
Author: Dave Brondsema <dave@brondsema.net>
Authored: Wed Mar 23 14:44:28 2016 -0400
Committer: Heith Seewald <heiths@gmail.com>
Committed: Wed Mar 23 15:30:43 2016 -0400

----------------------------------------------------------------------
 Allura/allura/templates/widgets/moderate_posts.html | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/8637eb74/Allura/allura/templates/widgets/moderate_posts.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/widgets/moderate_posts.html b/Allura/allura/templates/widgets/moderate_posts.html
index 6a73669..6d113d7 100644
--- a/Allura/allura/templates/widgets/moderate_posts.html
+++ b/Allura/allura/templates/widgets/moderate_posts.html
@@ -55,7 +55,14 @@
           <td>{{post.attachments|length}}</td>
           <td>
           {% if c.app.config.tool_name.lower() != 'discussion' %}
-            <a href="{{post.thread.artifact.url()}}">[{{post.thread.artifact.shorthand_id()}}]</a>
+            {% if post and post.thread and post.thread.artifact %}
+              <a href="{{post.thread.artifact.url()}}">[{{post.thread.artifact.shorthand_id()}}]</a>
+            {% else %}
+                <!-- debug: missing pointers
+                {% if post %} post._id: {{ post._id }} {% endif %}
+                {% if post.thread %} post.thread._id: {{ post.thread._id }} {% endif %}
+                -->
+            {% endif %}
           {%else%}
             <a href="{{post.url_paginated()}}">[{{post.shorthand_id()}}]</a>
           {% endif %}


Mime
View raw message