Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions app/models/template_email_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,9 @@ def update(self, template_id):
template_id=template_id,
template_email_file_id=self.id,
data={
"filename": self.filename,
"link_text": self.link_text,
"link_text": self.link_text if self.link_text else "",
"retention_period": self.retention_period,
"validate_users_email": self.validate_users_email,
"validate_users_email": bool(self.validate_users_email),
},
)

Expand Down
3 changes: 2 additions & 1 deletion app/notify_client/template_email_file_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from werkzeug.local import LocalProxy

from app import memo_resetters
from app.notify_client import NotifyAdminAPIClient
from app.notify_client import NotifyAdminAPIClient, cache


class TemplateEmailFileClient(NotifyAdminAPIClient):
Expand All @@ -29,6 +29,7 @@ def create_file(
}
return self.post(f"/service/{service_id}/templates/{template_id}/template_email_files", data=data)

@cache.delete_by_pattern("service-{service_id}-template-{template_id}*")
def update_file(
self,
template_email_file_id,
Expand Down