Skip to content

Commit

Permalink
move clean content row to the model
Browse files Browse the repository at this point in the history
  • Loading branch information
Hlamallama committed Feb 5, 2025
1 parent 74016ff commit 75f1bb7
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions home/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -968,15 +968,6 @@ def save_revision(
revision.content["whatsapp_template_name"] = template_name
revision.save(update_fields=["content"])
return revision

def clean_whatsapp_body(self):
"""Cleans whatsapp_body by removing non-printable characters except newlines, carriage returns, and tabs."""
if self.whatsapp_body:
self.whatsapp_body = "".join(
char for char in self.whatsapp_body if char.isprintable() or char in "\n\r\t"
).strip()



def clean(self):
result = super().clean(Page)
Expand Down

0 comments on commit 75f1bb7

Please sign in to comment.