Fix undefined author variable
This commit is contained in:
parent
e935911bd5
commit
3d6afc6625
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user