From 89a1b3a791275a0d2e14eaabf76c8ab5d2cbd22c Mon Sep 17 00:00:00 2001 From: Martin Brennan Date: Thu, 12 Mar 2020 16:10:56 +1000 Subject: [PATCH] Make sure reminder not sent for deleted post bookmark --- lib/bookmark_reminder_notification_handler.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bookmark_reminder_notification_handler.rb b/lib/bookmark_reminder_notification_handler.rb index 83f0b9fb3d..4591719fdc 100644 --- a/lib/bookmark_reminder_notification_handler.rb +++ b/lib/bookmark_reminder_notification_handler.rb @@ -7,7 +7,7 @@ class BookmarkReminderNotificationHandler def self.send_notification(bookmark) return if bookmark.blank? Bookmark.transaction do - if bookmark.post.blank? + if bookmark.post.blank? || bookmark.post.deleted_at.present? return clear_reminder(bookmark) end