summaryrefslogtreecommitdiffstats
path: root/adenosine-pds/templates
diff options
context:
space:
mode:
authorbryan newbold <bnewbold@robocracy.org>2023-03-04 19:30:05 -0800
committerbryan newbold <bnewbold@robocracy.org>2023-03-04 19:30:05 -0800
commit6942f47747f8655cf0702422f457f0476ab29c41 (patch)
treed826216b019d0a519b208621645dc5d777fb023a /adenosine-pds/templates
parent215003c210ce205f85f6a1488f6fc41685ce1f1f (diff)
downloadadenosine-6942f47747f8655cf0702422f457f0476ab29c41.tar.gz
adenosine-6942f47747f8655cf0702422f457f0476ab29c41.zip
pds: updates for Thread schema hacks (for CLI)
Diffstat (limited to 'adenosine-pds/templates')
-rw-r--r--adenosine-pds/templates/thread.html19
1 files changed, 16 insertions, 3 deletions
diff --git a/adenosine-pds/templates/thread.html b/adenosine-pds/templates/thread.html
index c0a8684..9a3f935 100644
--- a/adenosine-pds/templates/thread.html
+++ b/adenosine-pds/templates/thread.html
@@ -4,16 +4,29 @@
{% block main %}
{% if post.parent.is_some() %}
- {% call macro::feed_item(post.parent.as_ref().unwrap().post) %}
+ {% let parent = post.parent.as_ref().unwrap() %}
+ {% if parent.post.is_some() %}
+ {% call macro::feed_item(parent.post.as_ref().unwrap()) %}
+ {% else %}
+ <p>Post not found!
+ {% endif %}
<center><i>---</i></center>
{% endif %}
-{% call macro::feed_item(post.post) %}
+{% if post.post.is_some() %}
+ {% call macro::feed_item(post.post.as_ref().unwrap()) %}
+{% else %}
+ <p>Post not found!
+{% endif %}
{% if post.replies.is_some() && post.replies.as_ref().unwrap().len() > 0 %}
<center><i>--- replies ---</i></center>
{% for item in post.replies.as_ref().unwrap() %}
- {% call macro::feed_item(item.post) %}
+ {% if item.post.is_some() %}
+ {% call macro::feed_item(item.post.as_ref().unwrap()) %}
+ {% else %}
+ <p>Post not found!
+ {% endif %}
{% endfor %}
{% endif %}