Skip to content

Commit ae72def

Browse files
authored
Merge pull request watchdogpolska#2304 from watchdogpolska/develop
v1.5.54 fix template tags replacement
2 parents 1cdfdb6 + 1607224 commit ae72def

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

feder/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# PEP 396: The __version__ attribute's value SHOULD be a string.
2-
__version__ = "1.5.52"
2+
__version__ = "1.5.54"
33

44

55
# Compatibility to eg. django-rest-framework

feder/letters/models.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -332,14 +332,18 @@ def send_new_case(cls, case):
332332
return letter
333333

334334
def _email_context(self):
335-
body = self.body.replace("{{EMAIL}}", self.case.email)
336-
body = self.body.replace("{{ADRESAT}}", self.case.institution.name)
337-
html_body = self.html_body.replace("{{EMAIL}}", self.case.email)
338-
html_body = self.html_body.replace("{{ADRESAT}}", self.case.institution.name)
339-
quote = self.quote.replace("{{EMAIL}}", self.case.email)
340-
quote = quote.replace("{{ADRESAT}}", self.case.institution.name)
341-
html_quote = self.html_quote.replace("{{EMAIL}}", self.case.email)
342-
html_quote = self.html_quote.replace("{{ADRESAT}}", self.case.institution.name)
335+
body = self.body.replace("{{EMAIL}}", self.case.email).replace(
336+
"{{ADRESAT}}", self.case.institution.name
337+
)
338+
html_body = self.html_body.replace("{{EMAIL}}", self.case.email).replace(
339+
"{{ADRESAT}}", self.case.institution.name
340+
)
341+
quote = self.quote.replace("{{EMAIL}}", self.case.email).replace(
342+
"{{ADRESAT}}", self.case.institution.name
343+
)
344+
html_quote = self.html_quote.replace("{{EMAIL}}", self.case.email).replace(
345+
"{{ADRESAT}}", self.case.institution.name
346+
)
343347
context = {
344348
"html_body": mark_safe(html_body),
345349
"text_body": mark_safe(body),

0 commit comments

Comments
 (0)