From 3d6afc6625223e74d7e8f1ede0aae9438bf1368b Mon Sep 17 00:00:00 2001 From: Nathan Chapman Date: Fri, 22 Jul 2022 13:09:16 -0600 Subject: [PATCH] Fix undefined author variable --- src/core/forms.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/forms.py b/src/core/forms.py index d8dc965..a4b0703 100644 --- a/src/core/forms.py +++ b/src/core/forms.py @@ -85,8 +85,8 @@ class PostCreateForm(forms.ModelForm): def send_notification(self, request, post): recipients = list(post.recipients.values_list('email', flat=True)) url = get_current_site(request).domain + post.get_absolute_url() - if author.email in recipients: - recipients.remove(author.email) + if post.author.email in recipients: + recipients.remove(post.author.email) context = { 'subject': post.title,