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,