From 20ab9cb420946b7755792062e4f7cee4ab0b8ab2 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 22 Jan 2024 23:19:04 -0500 Subject: [PATCH] fix 500 with missing parent item --- .../_item_card_metadata_podcastepisode.html | 3 +++ .../_item_card_metadata_tvepisode.html | 3 +++ catalog/templates/podcastepisode.html | 8 +++++--- catalog/templates/tvepisode.html | 6 ++++-- .../activity/comment_child_item.html | 19 +++++-------------- 5 files changed, 20 insertions(+), 19 deletions(-) create mode 100644 catalog/templates/_item_card_metadata_podcastepisode.html create mode 100644 catalog/templates/_item_card_metadata_tvepisode.html diff --git a/catalog/templates/_item_card_metadata_podcastepisode.html b/catalog/templates/_item_card_metadata_podcastepisode.html new file mode 100644 index 00000000..dd9d9722 --- /dev/null +++ b/catalog/templates/_item_card_metadata_podcastepisode.html @@ -0,0 +1,3 @@ +{% extends "_item_card_metadata_base.html" %} +{% load humanize %} +{% load i18n %} diff --git a/catalog/templates/_item_card_metadata_tvepisode.html b/catalog/templates/_item_card_metadata_tvepisode.html new file mode 100644 index 00000000..dd9d9722 --- /dev/null +++ b/catalog/templates/_item_card_metadata_tvepisode.html @@ -0,0 +1,3 @@ +{% extends "_item_card_metadata_base.html" %} +{% load humanize %} +{% load i18n %} diff --git a/catalog/templates/podcastepisode.html b/catalog/templates/podcastepisode.html index 23f7ee23..efe6a894 100644 --- a/catalog/templates/podcastepisode.html +++ b/catalog/templates/podcastepisode.html @@ -10,13 +10,15 @@ {% load strip_scheme %} {% load thumb %} {% block head %} - + {% if item.parent_item %} + + {% endif %} - {% if item.media_url %} + {% if item.media_url and item.parent_item %} diff --git a/catalog/templates/tvepisode.html b/catalog/templates/tvepisode.html index 6ee5ff36..12547cc1 100644 --- a/catalog/templates/tvepisode.html +++ b/catalog/templates/tvepisode.html @@ -10,6 +10,8 @@ {% load strip_scheme %} {% load thumb %} {% block head %} - + {% if item.parent_item %} + + {% endif %} {% endblock %} diff --git a/social/templates/activity/comment_child_item.html b/social/templates/activity/comment_child_item.html index cc5ef38f..009f3373 100644 --- a/social/templates/activity/comment_child_item.html +++ b/social/templates/activity/comment_child_item.html @@ -24,19 +24,6 @@ data-position="{{ activity.action_object.metadata.position | default:0 }}"> {% endif %} -
- {% include "_item_card.html" with item=activity.action_object.item.parent_item allow_embed=1 %} + {% if activity.action_object.item.parent_item %} + {% include "_item_card.html" with item=activity.action_object.item.parent_item allow_embed=1 %} + {% else %} + {% include "_item_card.html" with item=activity.action_object.item %} + {% endif %