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)