From 8edce3122bff81a0797dc6e350da4c8830a73c2e Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 11 Feb 2023 23:10:24 -0500 Subject: [PATCH] fix empty comment on podcast mark --- journal/models.py | 4 +++- social/templates/activity/comment_focus_item.html | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/journal/models.py b/journal/models.py index 60edfa0d..286c47b2 100644 --- a/journal/models.py +++ b/journal/models.py @@ -223,7 +223,9 @@ class Comment(Content): @staticmethod def comment_item_by_user(item, user, text, visibility=0): - comment = Comment.objects.filter(owner=user, item=item).first() + comment = Comment.objects.filter( + owner=user, item=item, focus_item__isnull=True + ).first() if not text: if comment is not None: comment.delete() diff --git a/social/templates/activity/comment_focus_item.html b/social/templates/activity/comment_focus_item.html index 1e1c0a4b..14588bb0 100644 --- a/social/templates/activity/comment_focus_item.html +++ b/social/templates/activity/comment_focus_item.html @@ -22,7 +22,7 @@
- {% if activity.action_object.mark.text %} + {% if activity.action_object.text %}