Fix email preview logic per python 3
can't use filter() anymore
This commit is contained in:
parent
6b01a7e888
commit
b9d699df84
|
@ -280,7 +280,8 @@ class EmailPreview(View):
|
|||
def email_template(self):
|
||||
recipient = self.request.POST.get('recipient')
|
||||
if recipient:
|
||||
keys = filter(lambda k: k.startswith('send_'), self.request.POST.keys())
|
||||
keys = [key for key in self.request.POST.keys()
|
||||
if key.startswith('send_')]
|
||||
key = keys[0][5:] if keys else None
|
||||
if key:
|
||||
email = mail.get_email(self.rattail_config, key)
|
||||
|
|
Loading…
Reference in a new issue