From b9d699df849dae0d2279f1d4587dd0d33d3f7df0 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Thu, 28 Jun 2018 12:25:44 -0500 Subject: [PATCH] Fix email preview logic per python 3 can't use filter() anymore --- tailbone/views/email.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tailbone/views/email.py b/tailbone/views/email.py index d95be94d..b6f7b946 100644 --- a/tailbone/views/email.py +++ b/tailbone/views/email.py @@ -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)