From 3fb6dd4aebca0742417bf544bbbb7dcb36960d15 Mon Sep 17 00:00:00 2001 From: Son Date: Thu, 6 Jan 2022 11:07:50 +0100 Subject: [PATCH] check if there's an email that starts with "\u200f" (right-to-left mark (RLM)) in cron --- cron.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cron.py b/cron.py index 7d9b17dd..b5f2c0fd 100644 --- a/cron.py +++ b/cron.py @@ -702,6 +702,13 @@ def sanity_check(): migrate_domain_trash() set_custom_domain_for_alias() + # check if there's an email that starts with "\u200f" (right-to-left mark (RLM)) + for contact in Contact.filter(Contact.website_email.startswith("\u200f")).all(): + contact.website_email = contact.website_email.replace("\u200f", "") + LOG.e("remove right-to-left mark (RLM) from %s", contact) + + Session.commit() + LOG.d("Finish sanity check")