[fix] creates contact even in presence of bad char (#5618)
This commit is contained in:
parent
4aff164b69
commit
55d91bbcf5
1 changed files with 2 additions and 2 deletions
|
|
@ -10,6 +10,6 @@ def execute():
|
|||
users = frappe.get_all('User', filters={"name": ('not in', 'Administrator, Guest')}, fields=["*"])
|
||||
special_characters = "<>"
|
||||
for user in users:
|
||||
if re.findall("[{0}]+".format(special_characters), user.full_name):
|
||||
continue
|
||||
user.first_name = re.sub("[{0}]+".format(special_characters), '', str(user.first_name))
|
||||
user.last_name = re.sub("[{0}]+".format(special_characters), '', str(user.last_name))
|
||||
create_contact(user)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue