Skip to content

Commit

Permalink
Fix missing use of fields from bad merge
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffersonBledsoe committed Sep 12, 2024
1 parent a26d13c commit 9b64a9d
Showing 1 changed file with 3 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -482,19 +482,10 @@ def prepare_message(self):

def filter_parameters(self):
"""
do not send attachments fields.
Remove fields which shouldn't be included in emails.
Only applied to the attachment field at the time of writing.
"""
result = []

for field in self.block.get("subblocks", []):
if field.get("field_type", "") == "attachment":
continue

for item in self.form_data.get("data", []):
if item.get("field_id", "") == field.get("field_id", ""):
result.append(item)

return result
return [field for field in self.fields if field.send_in_email]

def send_mail(self, msg, charset):
host = api.portal.get_tool(name="MailHost")
Expand Down

0 comments on commit 9b64a9d

Please sign in to comment.