From 6a8f64a9e8103e1539b314a060eca6fe88b6216e Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Fri, 7 Feb 2020 16:21:51 -0600 Subject: [PATCH] Use new `Email.obtain_sample_data()` method when generating preview per upstream changes --- tailbone/views/email.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tailbone/views/email.py b/tailbone/views/email.py index d4c9e702..39b96733 100644 --- a/tailbone/views/email.py +++ b/tailbone/views/email.py @@ -125,7 +125,7 @@ class ProfilesView(MasterView): recips = email.get_recips(type_) if recips: return ', '.join(recips) - data = email.sample_data(self.request) + data = email.obtain_sample_data(self.request) return { '_email': email, 'key': email.key, @@ -299,7 +299,7 @@ class EmailPreview(View): key = self.request.POST.get('email_key') if key: email = self.handler.get_email(key) - data = email.sample_data(self.request) + data = email.obtain_sample_data(self.request) msg = email.make_message(data) subject = msg['Subject'] @@ -320,7 +320,7 @@ class EmailPreview(View): def preview_template(self, key, type_): email = self.handler.get_email(key) template = email.get_template(type_) - data = email.sample_data(self.request) + data = email.obtain_sample_data(self.request) self.request.response.text = template.render(**data) if type_ == 'txt': self.request.response.content_type = b'text/plain'